crud->getRequest()->has('order')){ $this->crud->orderBy('lft', 'asc')->orderBy('id', 'desc'); } CRUD::addColumn('#'); CRUD::column('is_front_show')->label(trans('backend.columnName.is_front_show'))->type('checkbox'); CRUD::column('name')->label(trans('backend.columnName.name'))->type('textarea_nl2br')->escaped(false)->searchLogic('text'); } /** * Define what happens when the Create operation is loaded. * * @see https://backpackforlaravel.com/docs/crud-operation-create * @return void */ protected function setupCreateOperation() { CRUD::setValidation(HealthInfoCatalogRequest::class); CRUD::addFields([ [ 'name' => 'is_front_show', 'label' => trans('backend.columnName.is_front_show'), 'type' => 'boolean', 'default' => true, ], [ 'name' => 'name', 'lable' => 'Name', 'type' => 'text', ], ]); } /** * Define what happens when the Update operation is loaded. * * @see https://backpackforlaravel.com/docs/crud-operation-update * @return void */ protected function setupUpdateOperation() { $this->setupCreateOperation(); } }