samedi 16 novembre 2019

filter on collection giving different resuts

I have Laravel collection when I dump collection and when I filter collection and then dump it shows me different results. Can anybody tell me what is the difference between these two ?? The screenshot is attached below

enter image description here

enter image description here

I am filtering collection like this :

$non_uploaded_orders = $batch_orders->filter(function($item){
            return ($item->batch_id == null && $item->status != 'declined');
        });


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire