今天测试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 ,但是这时候出现了错误提示 :

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

 

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

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

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

 



相关文章:

  • 2021-11-17
  • 2021-07-25
  • 2022-02-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-05
  • 2021-09-30
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-09
  • 2021-11-08
  • 2022-12-23
相关资源
相似解决方案