I would like to override the CRUD views of the Laravel Backpack CRUD package, because I want to make small changes to the layout. But obviously I don\'t want to change the CRUD
Found a way not even having to override the index() method, just use $this->crud->setListView() in your setup method of your CrudController, ex:
$this->crud->setListView('backpack::crud.different_list', $this->data);
thus, it will get the view under '/resources/views/vendor/backpack/crud/different_list.blade.php' instead of the default one in the package.
Besides setListView(), setEditView(), setCreateView(), setUpdateView()....are also available. hope it helps.
you can refer to https://laravel-backpack.readme.io/docs/crud-full-api for more detail.
// use a custom view for a CRUD operation
$this->crud->setShowView('your-view');
$this->crud->setEditView('your-view');
$this->crud->setCreateView('your-view');
$this->crud->setListView('your-view');
$this->crud->setReorderView('your-view');
$this->crud->setRevisionsView('your-view');
$this->crud->setRevisionsTimelineView('your-view');
$this->crud->setDetailsRowView('your-view');