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

ichbinabe's avatar

Using "php artisan" commands while developing package?

When developing a package locally how do you use php artisan commands? I'm developing my package in a separate repository but it's intended to be a Laravel package.

0 likes
6 replies
jlrdw's avatar

You could develop locally and push to the repository.

martinbean's avatar

@ichbinabe Which Artisan commands? Artisan commands are meant to be ran in Laravel applications and not from within PHP packages.

ichbinabe's avatar

Many of the make commands.

I often need to create package specific Models/Controllers/Etc and I like being able to spin them up using a command.

Is there a way to use the stubs that the artisan command uses without being within a laravel app?

cookie_good's avatar

I use Laravel Zero. It's Laravel without the public folder, etc, so good for make CLI application and scheduled tasks. The difference is, instead of php artisan it use php your-app-name

But make a package laravel I think is usually done in Raw OOP PHP

1 like

Please or to participate in this conversation.