I can't pass sendSms
to toHistory
method. It is always set as false
. How can I do it properly?
class SendMessage extends Notification implements ShouldQueue
{
use Queueable;
public $sendSms;
public function via($notifiable)
{
$this->sendSms = true;
}
public function toHistory($notifiable) {
echo $this->sendSms; //return false
}
}