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