fix false search in api.

This commit is contained in:
NMC 2021-08-01 15:10:22 -04:00
parent 976957ddd4
commit 4cfc4aec1d

View file

@ -79,10 +79,14 @@ class LicensesController extends Controller
if (($request->filled('maintained')) && ($request->input('maintained')=='true')) {
$licenses->where('maintained','=',1);
} elseif (($request->filled('maintained')) && ($request->input('maintained')=='false')) {
$licenses->where('maintained','=',0);
}
if (($request->filled('expires')) && ($request->input('expires')=='true')) {
$licenses->whereNotNull('expiration_date');
} elseif (($request->filled('expires')) && ($request->input('expires')=='false')) {
$licenses->whereNull('expiration_date');
}
if ($request->filled('search')) {