type('number'); */ } /** * Define what happens when the Create operation is loaded. * * @see https://backpackforlaravel.com/docs/crud-operation-create * @return void */ protected function setupCreateOperation() { CRUD::setValidation(NewsRequest::class); CRUD::setFromDb(); // set fields from db columns. /** * Fields can be defined using the fluent syntax: * - CRUD::field('price')->type('number'); */ } /** * Define what happens when the Update operation is loaded. * * @see https://backpackforlaravel.com/docs/crud-operation-update * @return void */ protected function setupUpdateOperation() { $this->setupCreateOperation(); } }