-
app/Models/Skills/Skill.php
Open in GitHubclass Skill extends Model { // protected $appends = ['complete_name']; // public function getCompleteNameAttribute() : string { return '[' . ($this->level->name ?? '') . '] ' . ($this->skill_type->shortname ?? '') . ' - ' . $this->name ?? ''; } }
-
app/Http/Controllers/Admin/EvaluationTypeCrudController.php
Open in GitHubuse Backpack\CRUD\app\Http\Controllers\CrudController; use Backpack\CRUD\app\Library\CrudPanel\CrudPanelFacade as CRUD; class EvaluationTypeCrudController extends CrudController { // protected function setupCreateOperation() { // CRUD::addField([ 'label' => __('Skills'), 'type' => 'select2_multiple', 'name' => 'skills', 'entity' => 'skills', 'model' => "App\Models\Skills\Skill", 'attribute' => 'complete_name', 'pivot' => true, 'select_all' => true, ]); // } // }