diff --git a/app/Http/Controllers/Api/LicensesController.php b/app/Http/Controllers/Api/LicensesController.php index 268248ab77..fc153f0ac4 100644 --- a/app/Http/Controllers/Api/LicensesController.php +++ b/app/Http/Controllers/Api/LicensesController.php @@ -77,6 +77,13 @@ class LicensesController extends Controller $licenses->where('supplier_id','=',$request->input('supplier_id')); } + if (($request->filled('maintained')) && ($request->input('maintained')=='true')) { + $licenses->where('maintained','=',1); + } + + if (($request->filled('expires')) && ($request->input('expires')=='true')) { + $licenses->whereNotNull('expiration_date'); + } if ($request->filled('search')) { $licenses = $licenses->TextSearch($request->input('search')); diff --git a/resources/views/licenses/view.blade.php b/resources/views/licenses/view.blade.php index 96b426d3dd..990e5e90bc 100755 --- a/resources/views/licenses/view.blade.php +++ b/resources/views/licenses/view.blade.php @@ -285,6 +285,17 @@ @endif +