dimanche 19 février 2017

Confused about Laravel 5 Queue for Sending Mail (Laravel 5.4)

I upgrade from Laravel 4.1 to 5.4. Queue migration is difficult.

Firstly, I commented out iron route from routes:

Route::post('queue/receive', function()
{
    return Queue::marshal();
});

Then, I configured database driver and migrated jobs table:

php artisan queue:table
php artisan migrate

I changed Mail::queue codes to the Mailables like this:

Mail::to('person@gmail.com')->queue(new ForgotPassword($user->first_name));

And lastly, I run this command from console:

php artisan queue:listen

When I fired a job, a row is inserted to the Jobs table but mail isn't sent. How can I solve this problem?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2mctWZi
via IFTTT

Aucun commentaire:

Enregistrer un commentaire