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