I have a xyz
function in my ApiController
class Foo
{
public function xyz()
{
// some code to insert data in database
}
}
And I have defined a route
Route::get('xyz', ['as' => 'xyz', 'uses' => 'ApiController@xyz']);
Now I need to execute the code in xyz
function in every 10 minutes
I have successfully set a crone job for one file, in that I am executing a php
file by simply set command with full path of that file.
I am not getting any clue to execute only one function of a controller via crone job.
Thanks