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

Today, when the test plan task snipet, inventory below the warning value, time will automatically send a message to the mailbox

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

 You can see the name of the current command is

snipeit: inventory-alerts 

I use windows10 commissioning, start:
1. Open cmd, cd .... into the project directory
2. Enter snipeit: inventory-alerts, but this time there was an error message:

Finally found the reason is due to the php version, PHP version I'm using 5.6.27

3. Then, I went to modify environment variables and update the current version of php php7 
then re-open cmd, enter the above command, the effect appears as shown below, separated by about one second to do the old, flew to receive the message mail sent successfully

 



Guess you like

Origin www.cnblogs.com/fpcing/p/10932052.html