-1

With laravel 5.8 envoy command I deploy my changes and I need from my envoy script to write app version to database

For this I created console command , which is located in app/Console/Commands/envoyWriteAppVersion.php file, but I did not find how to assign additive parameter to my consol commad. I tried like :

php artisan envoy:write-app-version  "654"
php artisan envoy:write-app-version  654
php artisan envoy:write-app-version  app_version=7.654

But I got error :

Too many arguments, expected arguments "command".
This task did not complete successfully on one of your servers

Which is the valid way ?

Thanks!

mstdmstd
  • 2,195
  • 17
  • 63
  • 140

1 Answers1

0

I found a valid decision to use in my console command method :

$arguments = $this->arguments();

as it is written here https://laravel.com/docs/5.8/artisan#command-io.

and run from console with space :

php artisan envoy:write-app-version 0.101
mstdmstd
  • 2,195
  • 17
  • 63
  • 140