danielyandev / laravel-easymake
Easy make commands for Laravel
1.0.4
2020-02-21 21:51 UTC
Requires
- php: ^7.1
Requires (Dev)
- laravel/framework: 6.*
- phpunit/phpunit: ^8.5
README
Getting started
Install package
composer require danielyandev/laravel-easymake
Some examples
Make model with migration and controller
This will create a model with defined relation, a migration with defined columns and a resource controller with defined methods. All you need is just to populate migration with extra columns and add view names to return
php artisan easymake:model Book --belongsTo="User" --softdeletes -mcr
Make model with soft deletes
php artisan easymake:model MyModel --softdeletes
or
php artisan easymake:model MyModel -d
Make model with hasOne relations
php artisan easymake:model MyModel --hasOne="Model1|Model2|...|ModelN"
With other parameters
php artisan easymake:model MyModel --hasOne="Model1,foreignKey1,localKey1|...|ModelN,foreignKeyN,localKeyN"
With namespace
php artisan easymake:model MyModel --hasOne="App\User|App\Models\SomeModel"