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