danielyandev/laravel-easymake

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

Easy make commands for Laravel

1.0.4 2020-02-21 21:51 UTC

This package is auto-updated.

Last update: 2021-09-22 01:29:49 UTC


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"

All available commands

Read the docs on gitbook.io here or check docs folder in this repository