src/Controllers/PermissionController.php
public function index(Request $request)
    {
        $this->authorize('view_permission');
        if (!empty($request->term)) {
            $term = trim($request->term);
            $permissions = Permissions::where('name', 'like', '%' . $term . '%')
                ->orWhere('description', 'like', '%' . $term . '%')
                ->orWhere('class', 'like', '%' . $term . '%')
                ->orWhere('method', 'like', '%' . $term . '%')
                ->paginate(config('roleManager.permissionsPerPage'));

        } else {
            $permissions = Permissions::paginate(
                config('roleManager.permissionsPerPage')
            );

        }
        return view(
            "RoleManager::permission.index",
            ['permissions' => $permissions]
        );
    }
public function index(Request $request)
    {
        $this->authorize('view_permission');
        if (!empty($request->term)) {
            $term = trim($request->term);
            $permissions = Permissions::where('name', 'like', '%' . $term . '%')
                ->orWhere('description', 'like', '%' . $term . '%')
                ->orWhere('class', 'like', '%' . $term . '%')
                ->orWhere('method', 'like', '%' . $term . '%')
                ->paginate(config('roleManager.permissionsPerPage'));

        } else {
            $permissions = Permissions::paginate(
                config('roleManager.permissionsPerPage')
            );

        }
        return view(
            "RoleManager::permission.index",
            ['permissions' => $permissions]
        );
    }
Display a listing of the resource.

@param Request $request

@return \Illuminate\Http\Response