'registration_date', 'label' => 'Regitration date', 'type' => 'date' ]); CRUD::column('state_registration_agency'); CRUD::column('registration_place'); CRUD::column('registration_address'); CRUD::column('fond_capital'); CRUD::column('management_types'); CRUD::column('signers'); CRUD::column('share_holders'); CRUD::column('organizational_form'); CRUD::column('is_agent'); /** * 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(CompanyRequest::class); CRUD::field('name'); CRUD::field('short_name'); CRUD::field('registration_number'); CRUD::addField([ // Date 'name' => 'registration_date', 'label' => 'Regitration date', 'type' => 'date' ]); CRUD::field('state_registration_agency'); CRUD::field('registration_place'); CRUD::field('registration_address'); CRUD::field('fond_capital'); CRUD::field('management_types'); CRUD::field('signers'); CRUD::field('share_holders'); CRUD::field('organizational_form'); CRUD::field('is_agent'); CRUD::addField([ 'label' => "profile", 'type' => 'select', 'name' => 'account.id', // the method that defines the relationship in your Model 'entity' => 'account', // the method that defines the relationship in your Model 'attribute' => 'id', // foreign key attribute that is shown to user 'model' => "App\Models\Account", // foreign key model ]); /** * 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(); } }