Implement very basic API searching. Closes #1348
This commit is contained in:
committed by
James Brooks
parent
9379ab131c
commit
0b3483fb8a
@@ -34,6 +34,8 @@ class IncidentController extends AbstractApiController
|
||||
|
||||
$incidents = Incident::where('visible', '>=', $incidentVisibility);
|
||||
|
||||
$incidents->search(Binput::except(['sort', 'order', 'per_page']));
|
||||
|
||||
if ($sortBy = Binput::get('sort')) {
|
||||
$direction = Binput::has('order') && Binput::get('order') == 'desc';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user