Laravel Argument 1 passed to AppModelsRecipientsAlertRecipient::__construct() must be an instance of AppModelsRecipientsstring, 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 ,但是这时候出现了错误提示 :

Laravel Argument 1 passed to AppModelsRecipientsAlertRecipient::__construct() must be an instance of AppModelsRecipientsstring, string given,

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

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

Laravel Argument 1 passed to AppModelsRecipientsAlertRecipient::__construct() must be an instance of AppModelsRecipientsstring, string given,