The “--queued” option does not exist in Laravel 5.4

别来无恙 提交于 2019-12-03 10:27:29

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/48239704/the-queued-option-does-not-exist-in-laravel-5-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!