Is there a possibility to reload/ redirect after a schedule is run in laravel?
I already tried it with the -> after() method on the schedule, but I can't get it to work.
$schedule->command('update:request')
->everyFiveMinutes()
->withoutOverlapping()
->after(function (){
return redirect('/');
});
CodePudding user response:
Command-side redirection is not possible. With Event listener, you can take action after the command finishes working. However, since Command is not linked to a page, redirection cannot be performed.