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