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