Fixes ternary that sets the offset in 0 when the offset passed to the API for the user is greater than total locations. (#9210)
This commit is contained in:
parent
2e298893b6
commit
ab7dd90602
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ class LocationsController extends Controller
|
|||
|
||||
|
||||
|
||||
$offset = (($locations) && (request('offset') > $locations->count())) ? 0 : request('offset', 0);
|
||||
$offset = (($locations) && (request('offset') > $locations->count())) ? $locations->count() : request('offset', 0);
|
||||
|
||||
// Check to make sure the limit is not higher than the max allowed
|
||||
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
|
||||
|
|
Loading…
Add table
Reference in a new issue