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

giwrgos's avatar

How I can execute php artisan vendor:publish when installing my package via composer?

Hello, I wrote a package which has some assets that needs to be published in order to use it. Instead of running 5 php artisan vendor:publish commands I prefer when installing via composer to execute this commands automatically.

I used post-install-cmd and post-update-cmd but didn't worked. Here is my repository

https://github.com/giwrgos88/core-game-platform/blob/master/composer.json#L48-L65

Does anyone knows what I'm doing wrong?

0 likes
0 replies

Please or to participate in this conversation.