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