I want to run the queue:listen --tries
command outside of artisan cli. For that i have written a function "task" in WelcomeController
and called it through routes. However it generates the above error. Codes are given below:
public function task()
{
Artisan::call('queue:listen', ['--tries'=>'3']);
}
Routes as follows
Route::post('/fun', array('uses'=>'WelcomeController@task'));