Tuesday, April 4, 2017

How to cahnge Laravel 5.4 notifications Via Manual

How to set via in controller

If one user want notification on mail and second user not want to notification in mail

so how to setup that one user notification send on mail and second user notification not send on mail

        $newinvoice = New NewInvoice('create a new invoice',$invoice->id);
        $newinvoice->via(['database','broadcast','mail']);
        Notification::send($sendToUser, $newinvoice);  

when i am run this code give me error

   InvalidArgumentException in Manager.php line 90: Driver [1] not supported.

Thank's in advance



via Narendra Jhala

Advertisement