mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-02 08:21:09 -08:00
Fixes #6341. Adding condition that checks offset of licenses seats when the user looks other page than the first. (#6392)
This commit is contained in:
parent
f6c0e7cc9c
commit
f91e340178
|
@ -229,6 +229,11 @@ class LicensesController extends Controller
|
||||||
|
|
||||||
$offset = request('offset', 0);
|
$offset = request('offset', 0);
|
||||||
$limit = request('limit', 50);
|
$limit = request('limit', 50);
|
||||||
|
|
||||||
|
if($seats->count() < $offset){
|
||||||
|
$offset = 0;
|
||||||
|
}
|
||||||
|
|
||||||
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
|
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
|
||||||
|
|
||||||
$total = $seats->count();
|
$total = $seats->count();
|
||||||
|
|
Loading…
Reference in a new issue