php artisan make:auth; php artisan migrate;
php artisan make:Event UserCreated
php artisan make:listener SendRegisterationEmail --event=UserCreated
/** * Create a new event instance. * * @return void */ public function __construct(User $user) { $this->user = $user; }
class SendRegisterationEmail implements ShouldQueue
QUEUE_DRIVER=database
php artisan queue:table; php artisan migrate;
php artisan queue:work
sudo apt-get install supervisor
[program:app-worker]process_name=%(program_name)s_%(process_num)02dcommand=php /var/www/html/app/artisan queue:work --sleep=3 --tries=3autostart=trueautorestart=trueuser=bvipulnumprocs=8redirect_stderr=truestdout_logfile=/var/www/html/app/worker.log
sudo supervisorctl rereadsudo supervisorctl updatesudo supervisorctl start app-worker:*