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