Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The "--queued" option does not exist in Laravel 5.4

I'm going to create Queue job for mailing. once I hit the artisan command in command prompt php artisan make:job SendSMSMessages --queued I got the issue as is follow.

The "--queued" option does not exist.

I'm using Laravel 5.4

Please anyone can help me for the same. I have searched a lot but didn't found any good solutions.

Thanks

like image 938
HItesh Tank Avatar asked Jan 13 '18 12:01

HItesh Tank


1 Answers

The option --queued, was introduced in Laravel 5.0, and remained an option until version Laravel 5.1 https://laravel.com/docs/5.1/queues#writing-job-classes

Since Laravel version 5.2 onwards, --queued was deperecated as by default all newly created jobs are "queued". So your question was about version 5.4, you should create the job without the queued option as below:

artisan make:job SendSMSMessages

And here's the documentation reference for Jobs in Version 5.4 https://laravel.com/docs/5.4/queues#creating-jobs

like image 160
nitrex Avatar answered Nov 16 '22 09:11

nitrex