repository = $requestform; parent::__construct(); } /** * Show requestform's list. * * @param string $slug * * @return response */ protected function index() { $requestforms = $this->repository->scopeQuery(function($query){ return $query->orderBy('id','DESC'); })->paginate(); return $this->theme->of('benefit_card::public.requestform.index', compact('requestforms'))->render(); } /** * Show requestform. * * @param string $slug * * @return response */ protected function show($slug) { $requestform = $this->repository->scopeQuery(function($query) use ($slug) { return $query->orderBy('id','DESC') ->where('slug', $slug); })->first(['*']); return $this->theme->of('benefit_card::public.requestform.show', compact('requestform'))->render(); } }