atnic / laravel-generator
Generator for Laravel Framework.
Installs: 1 602
Dependents: 1
Suggesters: 0
Security: 0
Stars: 13
Watchers: 5
Forks: 3
Open Issues: 1
Type:package
Requires
- php: >=7.0
- atnic/eloquent-filters: ^2.2
- laravel/framework: ^5.5|^5.6|^5.7|^5.8
- laravel/passport: >=4.0
- propaganistas/laravel-intl: >=2.1
- propaganistas/laravel-phone: ^4.2
Requires (Dev)
- fideloper/proxy: ~3.3
- filp/whoops: ~2.0
- fzaninotto/faker: ~1.4
- laravel/tinker: ~1.0
- mockery/mockery: ~1.0
- phpunit/phpunit: ^7.0
- dev-develop
- v0.10.5
- v0.10.4
- v0.10.3
- v0.10.2
- v0.10.1
- v0.10.0
- v0.9.5
- v0.9.4
- v0.9.3
- v0.9.2
- v0.9.1
- v0.9.0
- v0.8.4
- v0.8.3
- v0.8.2
- v0.8.1
- v0.8.0
- v0.7.8
- v0.7.7
- v0.7.6
- v0.7.5
- v0.7.4
- v0.7.3
- v0.7.2
- v0.7.1
- v0.7.0
- v0.6.2
- v0.6.1
- v0.6.0
- v0.5.2
- v0.5.1
- v0.5.0
- v0.4.1
- v0.4.0
- v0.3.2
- v0.3.1
- v0.3.0
- v0.2.11
- v0.2.10
- v0.2.9
- v0.2.8
- v0.2.7
- v0.2.6
- v0.2.5
- v0.2.4
- v0.2.3
- v0.2.2
- v0.2.1
- v0.2.0
- v0.1.0
- v0.0.1
- dev-feature/5
- dev-master
This package is auto-updated.
Last update: 2024-10-21 11:58:45 UTC
README
Installation
composer require atnic/laravel-generator
Make Module (CRUD)
This package is overriding some laravel artisan command.
This is example to make Foo module in this project
php artisan make:controller --model=Foo FooController
If create custom directory for model like this:
php artisan make:controller --model=App\\Models\\Foo FooController
Then do this steps:
- Check new migration in
database/migrations/
, add column needed. - Check new factory in
database/factories/
, add atrribute needed. - Check new model in
app/
, add changes needed. - Check new filter in
app/Filters/
, do allTODO:
and remove the comment if done. - Check lang en
resources/lang/en
and copy from en to lang idresources/lang/id
, add language as needed. - Check new controller in
app/Http/Controllers/
, complete returned array in methodrelations()
visibles()
fields()
rules()
, do allTODO:
, and remove comment if done. - Check new policy in
app/Policies/
, do allTODO:
and remove the comment if done. - No need to append new Policy to
$policies
attribute inapp/Providers/AuthServiceProvider.php
. This package handle policy auto discovery, even for Laravel < 5.8. - Check new views (index, create, show, edit) in
resources/views/
, add/extend section for title or anything. - Check new tests in
tests/Feature/
, do allTODO:
and remove the comment if done.
Other Useful command
#Creating Nested Controller php artisan make:controller --parent=Foo --model=Bar Foo/BarController #Creating Nested Controller with custom directory for model php artisan make:controller --parent=App\\Models\\Foo --model=App\\Models\\Bar Foo/BarController #Create Single Action Controller php artisan make:controller DashboardController #Creating Api Controller php artisan make:controller-api --model=Foo FooController #Creating Api Controller with custom directory for model php artisan make:controller-api --model=App\\Models\\Foo FooController #Creating Nested Controller API php artisan make:controller-api --parent=Foo --model=Bar Foo/BarController #Creating Nested Controller API with custom directory for model php artisan make:controller-api --parent=App\\Models\\Foo --model=App\\Models\\Bar Foo/BarController
All new/overrided command can be viewed in vendor/atnic/laravel-generator/app/Console/Commands
.