I am trying to add queue system to my Laravel app (local development). I have set these two paramaters in each file :
queue.php -> 'default' => env('QUEUE_DRIVER', 'database')
.env -> QUEUE_DRIVER=database
I have created an migrated my two table jobs and failed_jobs in my Database.
I have launched the queue system with "php artisan queue:work".
And I'm now trying to send mail via queue system with for example :
"Mail::to($email)->queue(new PasswordUpdatedMail($name));"
The mail is sent but never by the queue system, it's always sent with sync because the next automatic index is always "1" and when i place a sleep timer in the build function of my PasswordUpdatedMail, the broswer is waiting for the timer and after the mail is sent, the broswer write the success message.
So my mail skip the Queue System... I have looked for tutorials and forums but i don't find answer to my problem.
Thank's for your help !
php artisan config:cachecommand? If so, changes to your config will not be picked up until you run the command again. You can clear the config cache withphp artisan config:clear. - Namoshek