crud->addColumns([ [ 'name' => 'name', 'type' => 'text', 'label' => 'Name' ], [ 'name' => 'color', 'label' => 'Color', 'type' => 'color', ] ]); /** * Columns can be defined using the fluent syntax or array syntax: * - CRUD::column('price')->type('number'); * - CRUD::addColumn(['name' => 'price', '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(StatusRequest::class); $this->crud->addFields([ [ 'name' => 'name', 'type' => 'text', 'lable' => 'Name' ], [ 'name' => 'color', 'type' => 'color', 'label' => 'Color' ] ]); /** * Fields can be defined using the fluent syntax or array syntax: * - CRUD::field('price')->type('number'); * - CRUD::addField(['name' => '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(); } }