src/Controllers/RoleController.php
public function index(Request $request)
    {
        $this->authorize('view_role');
        if (!empty($request->term)) {
            $term = trim($request->term);
            $roles = Roles::where('name', 'like', '%' . $term . '%')
                ->orWhere('description', 'like', '%' . $term . '%')
                ->paginate(config('roleManager.rolesPerPage'));

        } else {
            $roles = Roles::paginate(config('roleManager.rolesPerPage'));
        }
        return view('RoleManager::role.index', ['roles' => $roles]);
    }
public function index(Request $request)
    {
        $this->authorize('view_role');
        if (!empty($request->term)) {
            $term = trim($request->term);
            $roles = Roles::where('name', 'like', '%' . $term . '%')
                ->orWhere('description', 'like', '%' . $term . '%')
                ->paginate(config('roleManager.rolesPerPage'));

        } else {
            $roles = Roles::paginate(config('roleManager.rolesPerPage'));
        }
        return view('RoleManager::role.index', ['roles' => $roles]);
    }
Display a listing of the resource.

@param Request $request

@return \Illuminate\Http\Response