Update BaseAPIController.php

force == comparator
This commit is contained in:
David Bomba 2018-01-31 13:04:31 +11:00 committed by GitHub
parent f40d0677b3
commit 62c018835a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,11 +99,11 @@ class BaseAPIController extends Controller
$query->with($includes); $query->with($includes);
if ($updatedAt = intval(Input::get('updated_at'))) { if ($updatedAt == intval(Input::get('updated_at'))) {
$query->where('updated_at', '>=', date('Y-m-d H:i:s', $updatedAt)); $query->where('updated_at', '>=', date('Y-m-d H:i:s', $updatedAt));
} }
if ($clientPublicId = Input::get('client_id')) { if ($clientPublicId == Input::get('client_id')) {
$filter = function ($query) use ($clientPublicId) { $filter = function ($query) use ($clientPublicId) {
$query->where('public_id', '=', $clientPublicId); $query->where('public_id', '=', $clientPublicId);
}; };