I work with Laravel Task Scheduling, but I have a problem when I call some method from my controller.
protected function schedule(Schedule $schedule)
{
$
Directly put this in schedule function in kernel.php file
$schedule->call('App\Http\Controllers\YourController@function')->everyMinute();
This will run after every minute
Note:
In localhost, you have to run it manually but on the server, you should try this command in your cronjob this will automatically call your controller function after every minute
php -d register_argc_argv=On /home/iflasity/public_html/foldername /artisan schedule:run > /dev/null 2>&1
cd /home/iflasity/public_html/foldername && php artisan schedule:run /dev/null 2>&1