repository = $matching_commission; parent::__construct(); } /** * Show matching_commission's list. * * @param string $slug * * @return response */ protected function index() { $matching_commissions = $this->repository ->pushCriteria(app('Litepie\Repository\Criteria\RequestCriteria')) ->scopeQuery(function($query){ return $query->orderBy('id','DESC'); })->paginate(); return $this->response->title(trans('$matching_commission::$matching_commission.names')) ->view('$matching_commission::public.matching_commission.index') ->data(compact('$matching_commissions')) ->output(); } /** * Show matching_commission's list based on a type. * * @param string $slug * * @return response */ protected function list($type = null) { $matching_commissions = $this->repository ->pushCriteria(app('Litepie\Repository\Criteria\RequestCriteria')) ->scopeQuery(function($query){ return $query->orderBy('id','DESC'); })->paginate(); return $this->response->title(trans('$matching_commission::$matching_commission.names')) ->view('$matching_commission::public.matching_commission.index') ->data(compact('$matching_commissions')) ->output(); } /** * Show matching_commission. * * @param string $slug * * @return response */ protected function show($slug) { $matching_commission = $this->repository->scopeQuery(function($query) use ($slug) { return $query->orderBy('id','DESC') ->where('slug', $slug); })->first(['*']); return $this->response->title($$matching_commission->name . trans('$matching_commission::$matching_commission.name')) ->view('$matching_commission::public.matching_commission.show') ->data(compact('$matching_commission')) ->output(); } }