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