getFacultyBySlugOnlyTask->run($facultySlug); $departments = $this->getActiveDepartmentsByFacultyIdTask->run($faculty->id); $departmentModel = $this->getDepartmentBySlugTask->run($departmentSlug, $cacheKey); $department = new DepartmentResource($departmentModel); $directions = $this->groupProgramsByDirectionTask->run($department->programs); return compact('department', 'departments', 'directions', 'departmentModel'); } }