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