Laravel - Notifications - Using The Notification Facade
Alternatively, you may send notifications via the Notification
facade. This approach is useful when you need to send a notification to multiple notifiable entities such as a collection of users. To send notifications using the facade, pass all of the notifiable entities and the notification instance to the send
method:
use Illuminate\Support\Facades\Notification;
Notification::send($users, new InvoicePaid($invoice));
You can also send notifications immediately using the sendNow
method. This method will send the notification immediately even if the notification implements the ShouldQueue
interface:
Notification::sendNow($developers, new DeploymentCompleted($deployment));