Backpack\CRUD provides a fast way to build admininistration panels - places where your administrators can Create, Read, Update, Delete entries for a specific Eloquent model. One CRUD Panel provides functionality for one Eloquent Model.
In order to create a CRUD Panel, you'll need:
If you don't already have the models, don't worry, Backpack also includes a faster way to generate database migrations and models.
A Backpack CRUD Panel uses the same elements you would have created for an administration panel, if you were doing it from scratch:
The only difference between building it from scratch and using Backpack\CRUD** is that:
Backpack\CRUD\app\Http\Controllers\CrudController**, which allow you to easily add traits that handle the most common operations: Create, Update, Delete, List, Show, Reorder, Revisions.
This simple architecture (
ProductCrudController extends CrudController) means:
Productis shown to the admin? just create a method called
ProductCrudController; simple OOP dictates that your method will be picked up, instead of the one in CrudController; some goes for
store(), etc - you have complete control;
ProductCrudControlleris a great place for that logic; just create a custom
publish()method and a route that points to it;
Tag entity, your CRUD Panel would consist of:
To further your understading of how a CRUD Panel works, read more about this example in the tutorial.