Answer the question
In order to leave comments, you need to log in
How to use artisan commands when creating Laravel 7 package?
Let's say I'm building a Laravel 7 package. How do I use the Laravel 7 artisan commands to create models, migrations, controllers, policies, etc.? for your package (in its directory)?
I did not find this information in the documentation.
Answer the question
In order to leave comments, you need to log in
Consider an example where you are developing your package locally.
A folder is created at the root of the project and an entry is added to composer.json like this
"repositories": [
{
"type": "path",
"url": "author/package"
}
]
php artisan make:migration name_migration --path=author/package
php artisan make:controller OurController && mv app/Http/Controllers/OurController.php author/package/pathWhereControllerStore
For modularity here .
There is nothing special about the composer. Maybe here .
Do you understand what you want?)
Maybe you just need to create your own console commands? And nothing can be generated in the packages folder
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question