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