Download the PHP package spinyman/laravel-will-queue without Composer
On this page you can find all versions of the php package spinyman/laravel-will-queue. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-will-queue
laravel-will-queue
This package gives you ability to change notification type (instant or via queue) dynamically.
Install
Via Composer
Usage
-
First of all you have to deimplement ShouldQueue interface from all notification models:
class EmailNotification extends Notification
implements ShouldQueue -
Make changes in User model:
use Illuminate\Notifications\Notifiable;use SpinyMan\WillQueue\Notifiable;
-
somewhere use notify function with second optional bool param to indicate queue (true) or instant (false) notification (default: false):
OR if you are really sure to notify using queue: