Laravel CRUD Generator
Introduction
This package adds a crud:generate command to Artisan in your Laravel project. With this command you can generate CRUD (Create, Read, Update, Delete) for your db tables instantly!
The generated CRUD includes a Controller, Model, Policy, routes, validations, and 4 view files (index, create, edit, show). It also supports relations between tables, so you can generate nested CRUDs, for example: generating CRUD for comments inside a blog post.
The output is fully customizable and supports both Bootstrap 5 and Tailwind CSS.
Demo Video
Screenshots
Index page
Laravel-crud can generate nested CRUDs. For example, you can generate CRUD for customers > tickets > replies by simply running:
$ php artisan crud:generate customers.tickets.replies
Table layout
(Automatically generated index page with responsive table layout)
The generated views are fully customizable and template based. For example, you can change the look of the index page by using different templates like table, cards or chat (included in the package).
Card layout
$ php artisan crud:generate customers.tickets.replies -i cards
(Card layout)
Chat layout
$ php artisan crud:generate customers.tickets.replies -i chat
(Chat layout)
Create / Edit Forms
Laravel CRUD generator can automatically generate the FORM for creating and editing records. It can also generate the validation rules for the form.
(Example of generated fields)
Heads up!
The package is still in alpha
You should only use it with new projects. If you are using it in an existing project, make sure to back up (or commit) any project changes before running the command.
The aim of the CRUD generator is to save you time by generating common boilerplate CRUD code for any database table instantly.
But this code is not intended to be used as-is. You should always customize the generated code to fit your needs and manually review the generated files before deploying it to production.