1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Support filtering API to active

This commit is contained in:
Hillel Coren 2018-06-17 13:01:43 +03:00
parent 4362fd182a
commit c15a13b987

View File

@ -99,6 +99,10 @@ class BaseAPIController extends Controller
$query->with($includes);
if (Input::get('filter_active')) {
$query->whereNull('deleted_at');
}
if (Input::get('updated_at') > 0) {
$updatedAt = intval(Input::get('updated_at'));
$query->where('updated_at', '>=', date('Y-m-d H:i:s', $updatedAt));