wassim.hattab
1 year ago

How to call a controller function from Schedule and pass parameters

Posted 1 year ago by wassim.hattab

Hello, I added a schedule to kernel.php where i want to call a function. It is working fine like below:

$schedule->call('\App\Http\Controllers\[email protected]')->hourly();

But when i want to pass parameters to test function i saw that you add an array like this:

$schedule->call('\App\Http\Controllers\[email protected]',['parameter'])->everyMinute();

but it's not sending the parameter.

Please sign in or create an account to participate in this conversation.