model = $task; parent::__construct(); } /** * Show task's list. * * @param string $slug * * @return response */ protected function index() { $tasks = $this->model->all(); return $this->theme->of('activity_project::public.task.index', compact('tasks'))->render(); } /** * Show task. * * @param string $slug * * @return response */ protected function show($slug) { $task = $this->model->findBySlug($slug); return $this->theme->of('activity_project::public.task.show', compact('task'))->render(); } }