I have the following code to filter through a Laravel collection:
$betweenDates = $feeChanges->filter(function ($feeChange) {
return ($feeChange->change_since >= $this->start_date) && ($feeChange->change_since <= $this->end_date);
})->values();
dd($betweenDates);
The $betweenDates
collection is empty. To debug I var_dumped the value I am returning and it returned true for 5 out of the 3 items in the $feeChanges
collection.
Why would this be happening??
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2tPbSZ4
via IFTTT
Aucun commentaire:
Enregistrer un commentaire