Here are all the features you will be using inside your EntityCrudController, grouped by the operation you will most likely use them for.


  • operation() - allows you to add a set of instructions inside setup(), that only gets called when a certain operation is being performed;
    public function setup() {
    // ...
    $this->crud->operation('list', function() {

List Operation


Manipulate what columns are shown in the table view.

  • addColumn() - add a column, at the end of the stack

  • addColumns() - add multiple columns, at the end of the stack

    $this->crud->addColumns([$column_definition_array, $another_column_definition_array]); 
  • modifyColumn() - change column attributes

    $this->crud->modifyColumn($name, $modifs_array);
  • removeColumn() - remove one column from all operations

  • removeColumns() - remove multiple columns from all operations

    $this->crud->removeColumns(['column_name_1', 'column_name_2']); // remove an array of columns from the stack
  • setColumnDetails() - change the attributes of one column; alias of modifyColumn();

    $this->crud->setColumnDetails('column_name', ['attribute' => 'value']);
  • setColumnsDetails() - change the attributes of multiple columns; alias of modifyColumn();

    $this->crud->setColumnsDetails(['column_1', 'column_2'], ['attribute' => 'value']);
  • setColumns() - remove previously set columns and only use the ones give now;

    // sets the columns you want in the table view, either as array of column names, or multidimensional array with all columns detailed with their types
  • Chained - beforeColumn() - insert current column before the given column

    // ------ REORDER COLUMNS
  • Chained - afterColumn() - insert current column after the given column

  • Chained - makeFirstColumn() - make this column the first one in the list

    // Please note: you need to also specify priority 1 in your addColumn statement for details_row or responsive expand buttons to show


  • addButton() - add a button in the given stack

    $this->crud->addButton($stack, $name, $type, $content, $position); 
    // stacks: top, line, bottom
    // types: view, model_function
    // positions: beginning, end (defaults to 'beginning' for the 'line' stack, 'end' for the others);
  • addButtonFromModelFunction() - add a button whose HTML is returned by a method in the CRUD model

    $this->crud->addButtonFromModelFunction($stack, $name, $model_function_name, $position);
  • addButtonFromView() - add a button whose HTML is in a view placed at resources\views\vendor\backpack\crud\buttons

    $this->crud->addButtonFromView($stack, $name, $view, $position);
  • modifyButton() - modify the attributes of a button

    $this->crud->modifyButton($name, $modifications);
  • removeButton() - remove a button from whatever stack it's in

    $this->crud->removeButton($name); // remove a single button
    $this->crud->removeButtons($names); // or multiple
  • removeButtonFromStack() - remove a button from a particular stack

    $this->crud->removeButtonFromStack($name, $stack);
  • removeAllButtons() - remove all buttons from any stack

  • removeAllButtonsFromStack() - remove all buttons from a particular stack



Manipulate what filters are shown in the table view. Check out CRUD > Operations > ListEntries > Filters to see examples of $filter_definition_array

  • addFilter() - add a filter to the list view

    $this->crud->addFilter($filter_definition_array, $values, $filter_logic);
  • modifyFilter() - change the attributes of a filter

    $this->crud->modifyFilter($name, $modifs_array);
  • removeFilter() - remove a certain filter from the list view

  • removeAllFilters() - remove all filters from the list view

  • filters() - get all the registered filters for the list view


Details Row

Shows a + (plus sign) next to each table row, so that the user can expand that row and reveal details. You are responsible for creating the view with those details.

  • enableDetailsRow() - show the + sign in the table view

    // NOTE: you also need to do allow access to the right users:
    // NOTE: you also need to do overwrite the showDetailsRow($id) method in your EntityCrudController to show whatever you'd like in the details row OR overwrite the views/backpack/crud/details_row.blade.php
  • disableDetailsRow() - hide the + sign in the table view


Export Buttons

Please note it will only export the current page of results. So in order to export all entries the user needs to make the current page show "All" entries from the top-left picker.

  • enableExportButtons() - Show export to PDF, CSV, XLS and Print buttons on the table view

Responsive Table

  • disableResponsiveTable() - stop the listEntries view from showing/hiding columns depending on viewport width

  • enableResponsiveTable() - make the listEntries view show/hide columns depending on viewport width


Persistent Table

  • enablePersistentTable() - make the listEntries remember the filters, search and pagination for a user, even if he leaves the page, for 2 hours

  • disablePersistentTable() - stop the listEntries from remembering the filters, search and pagination for a user, even if he leaves the page


Page Length

  • setDefaultPageLength() - change the number of items per page in the list view

  • setPageLengthMenu() - change the entire page length menu in the list view

    $this->crud->setPageLengthMenu([100, 200, 300]);

Actions Column

  • setActionsColumnPriority() - make the actions column (in the table view) hide when not enough space is available, by giving it an unreasonable priority

Custom / Advanced Queries

  • addClause() - change what entries are shown in the table view; this allows developers to forcibly change the query used by the table view, as opposed to filters, that allow users to change the query with new inputs;

    $this->crud->addClause('active'); // apply local scope
    $this->crud->addClause('type', 'car'); // apply local dynamic scope
    $this->crud->addClause('where', 'name', '=', 'car');
    $this->crud->addClause('whereName', 'car');
    $this->crud->addClause('whereHas', 'posts', function($query) {
  • groupBy() - shorthand to add a groupBy clause to the query

  • limit() - shorthand to add a limit clause to the query

  • orderBy() - shorthand to add an orderBy clause to the query


Show Operation

Use the same Columns API as for the ListEntries operation, but inside your show() method.

Create & Update Operations

Manipulate what fields are shown in the create / update forms. Check out CRUD > Operations > Create & Update > Fields in the docs to see examples of $field_definition_array.

Note: The call is being performed for the current operation. So it's important to pay attention where you're calling fields. Most likely, you'll want to do this inside setupCreateOperation() or setupUpdateOperation().

  • addField() - add one field

    $this->crud->addField('db_column_name'); // a lazy way to add fields: let the CRUD decide what field type it is and set it automatically, along with the field label
  • addFields() - add multiple fields

  • modifyField() - change the attributes of an existing field

    $this->crud->modifyField($name, $modifs_array);
  • removeField() - remove a given field from the current operation

  • removeFields() - remove multiple fields from the current operation

  • removeAllFields() - remove all registered fields

  • Chained - beforeField() - add a field before a given field

  • Chained - afterField() - add a field after a given field

  • setRequiredFields() - check the FormRequests used in this EntityCrudController for required fields, and add an asterisk to them in the create or edit forms

  • setValidation() - makes sure validation and authorization in the FormRequest you've passed is being performed; also uses that file to figure out asterisk to show in the forms (calls setRequiredFields() above):


Reorder Operation

Show a reorder button in the table view, next to Add. Provides an interface to reorder & nest elements, provided the parent_id, lft, rgt, depth columns are in the database, and $fillable on the model.

$this->crud->set('reorder.label', 'name'); // which model attribute to use for labels
$this->crud->set('reorder.max_level', 3); // maximum nesting depth; this example will prevent the user from creating trees deeper than 3 levels;
  • disableReorder() - disable the Reorder functionality

  • isReorderEnabled() - returns true/false if the Reorder operation is enabled or not


Revise Operation

A.k.a. Audit Trail. Tracks all changes to an entry and provides an interface to revert to a previous state. This operation is not installed by default - please check out Revise Operation for the installation & usage steps.

All Operations


Prevent or allow users from accessing different CRUD operations.

  • allowAccess() - give users access to one or multiple operations

    $this->crud->allowAccess(['list', 'create', 'delete']);
  • denyAccess() - prevent users from accessing one or multiple operations

    $this->crud->denyAccess(['list', 'create', 'delete']);
  • hasAccess() - check if the current user has access to one or multiple operations

    $this->crud->hasAccess('something'); // returns true/false
    $this->crud->hasAccessOrFail('something'); // throws 403 error
    $this->crud->hasAccessToAll(['create', 'update']); // returns true/false
    $this->crud->hasAccessToAny(['create', 'update']); // returns true/false

Eager Loading Relationships

  • with() - when the current entry is loaded (in any operation) also get its relationships, so that only one query is made to the database per entry

Custom Views

  • setShowView(), setEditView(), setCreateView(), setListView(), setReorderView(), setRevisionsView(), setRevisionsTimelineView(), setDetailsRowView() - set the view for a certain CRUD operation or feature
// use a custom view for a CRUD operation

// more generally, you can use the Settings API:
$this->crud->set('create.view', 'path.to.your.view');

// if you want to load something from the /resources/vendor/backpack/crud directory, you can do
$this->crud->set('create.view', 'crud::yourfolder.yourview');
// or
$this->crud->set('create.view', 'resources.vendor.backpack.crud.yourfolder.yourview');

Content Class

  • setShowContentClass(), setEditContentClass(), setCreateContentClass(), setListContentClass(), setReorderContentClass(), setRevisionsContentClass(), setRevisionsTimelineContentClass() - set the CSS class for an operation view, to make the main area bigger or smaller:
// use a custom view for a CRUD operation

// more generally, you can use the Settings API:
$this->crud->set('create.contentClass', 'col-md-12');


  • getEntry() - get a certain entry of the current model type

  • getEntries() - get all entries using the current CRUD query

  • getFields() - get all fields for a certain operation, or for both

  • getCurrentEntry() - get the current entry, for operations that work on a single entry

    // ex: in your update() method, after calling parent::updateCrud()


  • getOperation() - get the name of the operation that is currently being performed

  • setOperation() - set the name of the operation that is currently being performed



An action is the controller method that is currently being run.

  • getActionMethod() - returns the method on the controller that was called by the route; ex: create(), update(), edit() etc;

  • actionIs() - checks if the given controller method is the one called by the route


Title, Heading, Subheading


  • operation - a collection of functions in a CrudController, that together allow the admin to perform something on the current model;

  • action - a method (aka function) of an operation; it is the actual PHP function's name;

  • getTitle() - get the Title for the create action

  • getHeading() - get the Heading for the create action

  • getSubheading() - get the Subheading for the create action

  • setTitle() - set the Title for the create action

    $this->crud->setTitle('some string', 'create');
  • setHeading() - set the Heading for the create action

    $this->crud->setHeading('some string', 'create');
  • setSubheading() - set the Subheading for the create action

    $this->crud->setSubheading('some string', 'create');

CrudPanel Basic Info

  • setModel() - set the Eloquent object that should be used for all operations

  • setRoute() - set the main route to this CRUD

    // OR $this->crud->setRouteName("admin.example");
  • setEntityNameStrings() - set how the entity name should be shown to the user, in singular and in plural

    $this->crud->setEntityNameStrings("example", "examples");

Like our open-core?

Then you'll love our premium add-ons - productivity tools and tons of new features.