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