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