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