vendredi 11 septembre 2020

Command with argument not running via URL in laravel

i have setup dynamic url for artisan command execution via URL in my project.But command with argument not running via URL,Here is my code

Routes

Route::get('/artisan/{command}/{param}', 'CommandController@index');

Controller

public function index($command, $param)
    {
        echo $command;die;
        $artisan = Artisan::call($command.":".$param);
        $output = Artisan::output();
        return $output;
    }

And my command signature is

protected $signature = 'cron:getdata {date}';

while i am running i am getting below error

Not enough arguments (missing: "date").


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire