mardi 17 avril 2018

Call Artisan Comman via URL

in my route i have

Route::get('artisan/{command}/{param}', 'CacheController@show');

and in my controller i have

public function show($id, $param)
    {
        $artisan = Artisan::call($id,['flag'=>$param]);
        $output = Artisan::output();
        return $output;
    }

i want to be able to call route:cache and cache:clear by accessing domain.com/artisan/cache/clear or route/cache, but when i call them it returned something like this

Command "cache" is not defined. it only called cache, not cache:clear, what possibility goes wrong?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire