CRUD Generator
Getting Super Powers of CRUD Generator
Adminetic Admin Panel gives you handy crud generator command
php artisan make:crud Post
Here Post
isthe name of the module. The above command will generate :
Model named Post
Request file named PostRequest
Controller named PostController
Repository named PostRepository
Interface named PostInterface
Create, Edit, Index file on views under post folder
edit_add and script file in views/layouts/modules/post folder
Wait...there is more you can create ACL along with command which will grand BREAD permission controller for Post Module by using following command :
php artisan make:crud Post --acl
This will create policy file and necessary permissions.
There's more ... can we generate API scaffold as well....YES we can use following command
Consuming API Scaffold
php artisan make:crud Post --api
REST API Scaffold
php artisan make:crud Post --rest
Last updated
Was this helpful?