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