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