search; $pageLimit = $request->input('pageLimit', config('database.pagination.limit')); $page = DemoRestaurant::pushScope(new RequestScope()) ->pushScope(new DemoRestaurantPublicScope()) ->paginate($pageLimit) ->withQueryString(); $demo_restaurants = new DemoRestaurantsCollection($page); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle(trans('demo::demo_restaurant.names')) ->view('demo::public.demo_restaurant.index') ->data(compact('demo_restaurants', 'categories', 'tags', 'recent')) ->output(); } /** * Show demo_restaurant. * * @param string $slug * * @return response */ protected function show(PublicRequest $request, $slug) { $model = DemoRestaurant::findBySlug($slug); $data = new DemoRestaurantResource($model); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle($data['title'] . trans('demo::demo_restaurant.name')) ->view('demo::public.demo_restaurant.show') ->data(compact('data', 'categories', 'tags', 'recent')) ->output(); } }