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