1. Create table for queue and also failed-table too. Queue table is for saving list of some jobs (emails that will be sent) and failed-table is for saving failed list of our emails. For creating those tables, we can use these commands :
php artisan queue:table
php artisan queue:failed-table
So we have two migration files now :Next, execute migration command:
php artisan migrate
Aaand now we have two tables in our phpmyadmin :2. Change QUEUE_DRIVER = sync to database on .env file :
3. Create new job :
php artisan make:job {your-job-file-name}
5. Actually, we can do this step in step 3, buuut... mmmm.... yaaah... it's okie to seperate it in another step... :D
So... in this step 5, let's complete our handle method :
6. Run php artisan queue:listen
This command is the starting point for our queue job to be executed by laravel.
Good Sound Advice for the developers who are looking to improve their performance of the business. Thanks for sharing this blog!
ReplyDeleteHire Cake Php Developer
Smarty Developers
Hire Cake Php Programmer
Hire Phonegap Developer
Hire Dedicated Laravel Developer