Search code examples
laravellaravel-backpack

How to delete or hide the 'Add' button from the 'Top' stack in backpack Laravel?


I want to hide the button Add button from the Top stack ? i tried $this->crud->removeButton('create'); and $this->crud->removeButtonFromStack('create', 'top'); but it's not working. I don’t want to use $this->crud->denyAccess('create'); because this will cause me a problem when i'm updating. How can i hide the button?


Solution

  • I found the solution. I was adding $this->crud->removeButton('create') in setup() instead of setupListOperation().