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

s.spaan's avatar
Level 41

Use Laravel Command as a Deploy Script

I want to create a deploy script for my applications but i was wondering if it's possible to use a Laravel Command as a deploy script.

So that i just can call php artisan deploy and that the script than runs the necessary steps (composer install, migrate, queue restart, etc).

Or is this not possible because the composer install can break the operation ?

0 likes
2 replies
drewdan's avatar

We do something similar. We have a PHP artisan upgrade command that does all of this, except composer installing, we do that separately

s.spaan's avatar
Level 41

@drewdan The most important step for me is composer install.

For info; i want to check if composer is still 1.x on the server (and not 2.x) And continue on..

But if its not possible in an Artisan Command (because a composer install could break the operation if there are any updates), than i will try to create a bash script ..

I can create an application to test this out; but i though i just ask if anyone know the answer before i try.

Please or to participate in this conversation.