middleware(['auth' => 'departmentPermissions'])->except('index', 'show'); // Model $this->modelType = StringHelper::toURL(__('models.department')); $this->modelData = [ 'name' => [ 'label' => __('models.name'), 'type' => 'inputText', 'placeholder' => __('models.department'), 'validation' => [ 'rules' => 'required|min:3', ] ], 'instances' => [ 'label' => __('models.instances'), 'type' => 'checkboxSelection', 'foreign'=> [ 'class' => Tag::class, 'model' => 'tags', 'column' => 'name', 'order' => [ 'column' => 'name', 'direction' => 'ASC' ], 'conditions' => [ [ 'column' => 'type', 'value' => 'instanz', ], ], ], ], 'order' => [ 'type' => 'inputHidden', ] ]; // URL options $this->url = 'department'; $this->route = StringHelper::toURL(__('models.department')); $this->adminIndexOptions = [ 'orderBy' => 'order', 'orderDirection' => 'ASC', 'paginate' => 10, 'listdata' => [ 'name' => [], 'instances' => [], 'order' => [ 'label' => __('admin.priority') ], 'updated' => [ 'label' => __('admin.last modified') ] ] ]; parent::__construct(); } }