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