3
我需要訪問我的laravel調度功能UserController中的方法,如何在laravel調度程序中訪問控制器中的方法?
protected function schedule(Schedule $schedule)
{
$schedule->command('foo')
->hourly();
}
這可能嗎?
我需要訪問我的laravel調度功能UserController中的方法,如何在laravel調度程序中訪問控制器中的方法?
protected function schedule(Schedule $schedule)
{
$schedule->command('foo')
->hourly();
}
這可能嗎?
嘗試他:
$schedule->call('Full\Namespace\[email protected]')
->hourly();
你試圖把UserController中的command's建設,讓Laravel注入呢? –