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