crud->setModel('App\Models\Document'); $this->crud->setRoute(config('backpack.base.route_prefix') . '/document'); $this->crud->setEntityNameStrings('document', 'documents'); } protected function setupListOperation() { // TODO: remove setFromDb() and manually define Columns, maybe Filters CRUD::column('title'); CRUD::column('file'); } protected function setupCreateOperation() { $this->crud->setValidation(DocumentRequest::class); // TODO: remove setFromDb() and manually define Fields CRUD::field('title'); CRUD::field('file')->type('upload')->upload(true); } protected function setupUpdateOperation() { $this->setupCreateOperation(); } protected function setupReorderOperation() { // define which model attribute will be shown on draggable elements $this->crud->set('reorder.label', 'title'); // define how deep the admin is allowed to nest the items // for infinite levels, set it to 0 $this->crud->set('reorder.max_level', 1); } }