Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mstdmstd's avatar

How from my envoy script to write app version to database?

Hello, 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 console 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!

0 likes
2 replies
bobbybouwmann's avatar
Level 88

Mmh your code looks fine to me. It seems however you have some extra spaces, not sure if that is the problem! That's something to verify as well

Can you show your command class? There is a difference between arguments and options and if you used options above commands don't work indeed.

1 like
mstdmstd's avatar

Thanks for your hints.In command handle I had to use : $arguments = $this->arguments();

Please or to participate in this conversation.