Laravel - Notifications - Using The Notifiable Trait
Notifications may be sent in two ways: using the notify
method of the Notifiable
trait or using the Notification
facade. The Notifiable
trait is included on your application's App\Models\User
model by default:
The notify
method that is provided by this trait expects to receive a notification instance:
use App\Notifications\InvoicePaid;
$user->notify(new InvoicePaid($invoice));
Remember, you may use theNotifiable
trait on any of your models. You are not limited to only including it on yourUser
model.