repository = $calendar_event_status; parent::__construct(); } /** * Show calendar_event_status's list. * * @param string $slug * * @return response */ protected function index() { $calendar_event_statuses = $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_status.names')) ->view('advancedcrm::calendar_event_status.index') ->data(compact('calendar_event_statuses')) ->output(); } /** * Show calendar_event_status. * * @param string $slug * * @return response */ protected function show($slug) { $calendar_event_status = $this->repository->scopeQuery(function($query) use ($slug) { return $query->orderBy('id','DESC') ->where('slug', $slug); })->first(['*']); return $this->response->setMetaTitle($$calendar_event_status->name . trans('advancedcrm::calendar_event_status.name')) ->view('advancedcrm::calendar_event_status.show') ->data(compact('calendar_event_status')) ->output(); } }