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