Crud: Hide the Add button

Created on 25 Nov 2016  路  3Comments  路  Source: Laravel-Backpack/CRUD

Is there anywhere I can hide the Add button in CRUD page? I know $this->crud->removeAllButtonsFromStack('line'); removes the button stack to the right.

Most helpful comment

@AurelDragut Great! I found that the key I used "add" was not the correct one facepalm. I changed that to

$this->crud->removeButton('create');

All 3 comments

Yes, i remove the "create" from "create/update/both" in the controller when i want that.

@AurelDragut Great! I found that the key I used "add" was not the correct one facepalm. I changed that to

$this->crud->removeButton('create');

In the latest version, the following worked for me.

$this->crud->denyAccess('create');
Was this page helpful?
0 / 5 - 0 ratings