Correct comparison logic

Comparison operator should be greater than or equal
This commit is contained in:
Phan Nguyen 2022-10-08 12:54:15 +07:00 committed by GitHub
parent 15da3b831d
commit 8ff109e9da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,7 +39,7 @@ class LicenseSeatsController extends Controller
}
$total = $seats->count();
$offset = (($seats) && (request('offset') > $total)) ? 0 : request('offset', 0);
$offset = (($seats) && (request('offset') >= $total)) ? 0 : request('offset', 0);
$limit = request('limit', 50);
$seats = $seats->skip($offset)->take($limit)->get();