public function __construct() { $this->middleware('departmentAccess:6'); $this->middleware('adminDepartmentObject:Criteria', ['only' => ['edit', 'update', 'delete']]); $this->systemAdmin = false; $departments = []; $types = new CriteriaType(); if (systemAccess(100)) { $this->systemAdmin = true; $departments = getNomenclatureSelect($this->getDepartmentsAdmin(), true); } view()->share(['systemAdmin' => $this->systemAdmin, 'departments' => $departments, 'types' => $types->getTypes()]); }
public function build() { $type = new CriteriaType($this); return $type->build(); }