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