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