Reputation: 917
I need to access a method of my UserController in laravel scheduler function,
protected function schedule(Schedule $schedule)
{
$schedule->command('foo')
->hourly();
}
Is it possible?
Upvotes: 3
Views: 1632
Reputation: 35973
try his:
$schedule->call('Full\Namespace\YourController@method')
->hourly();
Upvotes: 2