modules = $this->modules(config('ebuy.order.modules'), 'order', guard_url('order')); $this->repository = $order; } /** * Show order's list. * * @return response */ protected function index(PublicRequest $request) { $search = $request->search; $pageLimit = $request->input('pageLimit', config('database.pagination.limit')); $data = $this->repository ->pushFilter(RequestFilter::class) ->pushFilter(OrderPublicFilter::class) ->setPresenter(OrderListPresenter::class) ->select('orders.*') ->paginate($pageLimit) ->withQueryString() ->toArray(); extract($data); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle(trans('order::order.names')) ->view('order::public.order.index') ->data(compact('data', 'meta', 'categories', 'tags', 'recent')) ->output(); } /** * Show order. * * @param string $slug * * @return response */ protected function show(PublicRequest $request, $slug) { $data = $this->repository ->findBySlug($slug) ->toArray(); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle($data['title'] . trans('order::order.name')) ->view('order::public.order.show') ->data(compact('data', 'categories', 'tags', 'recent')) ->output(); } }