Laravel Argument 1 passed to App\Models\Recipients\AlertRecipient::__construct() must be an instance of App\Models\Recipients\string, string given,


今天测试snipet的计划任务,库存低于警告值的时候,时候会会自动发送邮件到邮箱

class SendInventoryAlerts extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'snipeit:inventory-alerts';

 可以看到 当前命令的名称为

  snipeit:inventory-alerts

我使用windows10调试的,开始:
1.打开cmd,cd.... 进入项目目录
2.输入 snipeit:inventory-alerts ,但是这时候出现了错误提示 :

 

最后发现是由于php版本的缘故,我现在使用的PHP版本是5.6.27

3.然后,我去修改环境变量,并且更新了当前的php版本为php7
然后重新打开cmd,输入上述命令,出现的效果如下图所示,大概隔了1秒做旧,立马就收到邮件了,邮件成功发送

 




免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM