Laravel Scheduling call controller

后端 未结 5 1642
北荒
北荒 2021-01-04 05:23

I work with Laravel Task Scheduling, but I have a problem when I call some method from my controller.

protected function schedule(Schedule $schedule)
{
    $         


        
5条回答
  •  离开以前
    2021-01-04 05:53

    For me, the first error looks like you need to run composer update, then composer dump-autoload.

    If it works you will also get the second error, the 2002 error meaning is:

    Can't connect to local MySQL server through socket" (see (Client Error Codes and Messages in MySQL docs).

    You need to set your database configuration in your .env file

提交回复
热议问题