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