laravel-package-tools
laravel-package-tools copied to clipboard
Add the generation of Models, migrations and model factories
In this PR I've added the ability to generate model classes, migration classes and model factory classes. The models can be generated with or without accompanying migrations and/or model factories.
The classes can be generated as described in the updated readme.
To create a migration and a factory together with a model, users can attach the -m or -f flags (like in a Laravel application) or use the fully specified flags --migration or --factory.
./vendor/bin/pkg-tools make:model ExampleModel -mf
Let me know if there are some things up for improvement.