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