“-排队"的Laravel 5.4中不存在该选项 [英] The "--queued" option does not exist in Laravel 5.4

查看:316
本文介绍了“-排队"的Laravel 5.4中不存在该选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将创建用于邮件发送的队列作业.在命令提示符php artisan make:job SendSMSMessages --queued中点击artisan命令后,我就收到了如下问题.

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.

我正在使用Laravel 5.4

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.

谢谢

推荐答案

选项--queued是在Laravel 5.0中引入的,并且一直是选项,直到版本Laravel 5.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

从Laravel 5.2版开始,--queueed被弃用,因为默认情况下,所有新创建的作业都被排队".因此,您的问题是关于5.4版的,您应该在不使用以下排队选项的情况下创建作业:

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

这是5.4版作业的文档参考 https://laravel.com/docs/5.4/queues#creating-jobs

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

这篇关于“-排队"的Laravel 5.4中不存在该选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆