Boardy
Boardy

Reputation: 36227

Developing Laravel Package - How to access artisan commands

I have been working on a new Laravel package where I've manually created the directory structure then manually make the controllers and then add my package into a main laravel 8 project which all works fine but when developing the package you don't have access to the artisan commands to quickly scaffold some of the code.

Plus the IDE (PHP Storm in my case) doesn't know what any of the laravel methods are so it thinks the code is wrong and there's no auto complete available and you don't have access to the artisan command to automatically scaffold controllers, requests migrations etc, so you lose a lot of the benefits of Laravel and the IDE when developing a package.

Is there a way to add something to the package and/or the IDE to make this functionality available. I've looked at the package scaffolders available at https://laravelpackage.com/#tools-and-helpers but they all seem to be somewhat broken, or just create the basic directory structure and not provide the artisan commands or using old versions of Laravl or PHP 7. I am using Laravel 8 and PHP 8.

Upvotes: 3

Views: 415

Answers (0)

Related Questions