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 :

  1. Model named Post

  2. Request file named PostRequest

  3. Controller named PostController

  4. Repository named PostRepository

  5. Interface named PostInterface

  6. Create, Edit, Index file on views under post folder

  7. 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