laravelha/generator is a Laravel package for laravelha generator.
It currently has 22 GitHub stars and 5.077 downloads on Packagist (latest version v2.0.1).
Install it with composer require laravelha/generator.
Discover more Laravel packages by laravelha
or browse all Laravel packages to compare alternatives.
Last updated
Laravel RAD Package based on Laravel-5-Generators-Extended
After install fresh Laravel application:
composer require laravelha/preset-api --dev or composer require laravelha/preset-web --devphp artisan preset ha-api or php artisan preset ha-web --option=authcomposer require laravelha/generator --devphp artisan ha-generator:<COMMAND> <ARGUMENTS> <OPTIONS> to create automatically generated code.ha-generator:migration "Create a new migration class and apply schema at the same time"
ha-generator:model "Create a new model class and apply schema at the same time"
ha-generator:factory "Create a new factory class and apply schema at the same time"
ha-generator:requests "Create a new requests class and apply schema at the same time"
ha-generator:controller "Create a new controller and resources for api"
ha-generator:resources "Create a new resources class and apply schema at the same time"
ha-generator:route "Insert new resources routes"
ha-generator:test "Create a new feature test and apply schema at the same time"
ha-generator:lang "Create a new lang resource and apply schema at the same time"
ha-generator:view "Create a new views resource and apply schema at the same time"
ha-generator:breadcrumb "Insert new resources breadcrumb"
ha-generator:nav "Insert new nav item"
ha-generator:crud "Run all commands"
ha-generator:existing:crud "Run all commands from a existing database"
ha-generator:package "Create scaffolding structure to packages"
php artisan help ha-generator:<COMMAND>This is my approach to use it.
composer create-project --prefer-dist laravel/laravel blog && cd blog
git init
git add .
git commit -m 'feat: install laravel fresh app'
composer require laravelha/preset-web --dev
php artisan preset ha-web --option=auth
git add .
git commit -m 'feat: install and run laravel laravelha/preset-web with auth'
composer require laravelha/generator --dev
php artisan vendor:publish --tag=ha-generator
php artisan ha-generator:crud Category -s 'title:string(150), description:text:nullable, published_at:timestamp:nullable'
git add .
git commit -m 'feat: create category crud by generator'
php artisan ha-generator:crud Post -s 'title:string(150), content:text, published_at:timestamp:nullable, category_id:unsignedBigInteger:foreign'
git add .
git commit -m 'feat: create post crud by generator'
It is very important that the stage is clean before running the generator, because if you give up what was generated it is possible to undo completely with
git clean -fd; git checkout .
Every command generated is store on /storage/logs, if you need detailer each command within crud, use the option
--log-details
app/
├── <SINGULAR_CLASS_NAME>.php
│
└── Http
├── Controllers
| ├── Auth
| ├── IndexController.php
| └── <SINGULAR_CLASS_NAME>Controller.php
|
└── Requests
└── Requests
├── <SINGULAR_CLASS_NAME>StoreRequest.php
└── <SINGULAR_CLASS_NAME>UpdateRequest.php
config/
└── ha-generator.php
database
├── factories
| └── <SINGULAR_CLASS_NAME>Factory.php
|
└── migrations
└── YYYY_MM_DD_HHmmSS_create_<PLURAL_CLASS_NAME>_table.php
resources
├── lang/pt-br
| └── <PLURAL_CLASS_NAME>.php
|
└── views
└── <PLURAL_CLASS_NAME>
├── create.blade
├── delete.blade
├── edit.blade
├── index.blade
└── show.blade
routes
├── api.php
├── breadcrumbs.php
└── web.php
API api generated from generator
WEB web application generated from generator
