CRUD Settings

CRUD Title and Visual Title

For every CRUD you start with CRUD Title (like "Projects", "Books" etc.) and Visual title (which is suggested to you automatically, usually it's the same as title).

CRUD Title field defines names of all the generated files, so if you enter "Projects" then these files will be generated:

  • Model app/Project.php (singular name, not Projects.php)
  • Controller app/Http/Controllers/ProjectsController.php
  • Views folder resources/views/projects with files like index.blade.php, create.blade.php etc.
  • Request file for validation: app/Http/Requests/StoreProjectsRequest.php etc.

So it's really important that your CRUD Title field would be an English word in plural form. Otherwise Laravel may not understand your word and fail with singular-plural file names.

For non-English projects you customize Visual Title field - that's exactly what will be visible in sidebar for menu item title. Visual Title may be totally different from CRUD title, you can put whatever you want in Visual Title in whatever language of the world.


CRUD Icon

You can choose any icon from Font Awesome library which will be shown in the left sidebar for menu item.


Parent menu item

If you have created any Parent menu items, you can choose one of them to be the parent of currently created menu item.


What actions to generate?

You can choose what actions/views to generate, maybe your CRUD will be edit-only or something like that. You can choose from:

  • Create (which will generate Controller's create() method and file create.blade.php)
  • Edit (Controller's edit() method and file edit.blade.php)
  • Show (Controller's show() method and file show.blade.php)
  • Delete (Controller's destroy() method and Delete button in the list)

Generate API Controller for this CRUD

You can also choose to create a separate API Controller, in additional to visual CRUD. If you tick that checkbox, these files will be generated:

  • routes/api.php will have additional line for that Controller
  • app/Http/Controllers/Api/V1/ will have a new resource-ful Controller for API only

Notice: please note that it does not generate any authentication mechanism, only route and controller. For authentication, you should add your code after download, using Laravel Passport or other auth mechanism. Or, if you want an API-first project with already pre-built auth, you can check our Vue.js+Laravel generator version.


Soft-deletes

By default, we generate all models with soft-deletes. If you leave this checkbox checked, migration files will have $table->softDeletes(); and model will have use SoftDeletes; code.

In addition to that, we generate two more functions:

  • Links on top of the table All and Trash
  • If you go to Trash list, there are two buttons for each entry: Restore or Delete Permanently

Final note: Main settings section may contain more fields, depending on what Modules you have installed.

Next, we're gonna dive into various field types and relationship which you can use in your CRUDs.