in laravel collection remove key if value is null

i new in laravel, trying to filter null value array and remove from array. like this i have this array from response

array:8 [▼
"videoa" => Collection {#801 ▼
#items: []
}
"music" => Collection {#872 ▼
#items: array:69 [▶]
}
"meditation" => Collection {#869 ▼
#items: array:1 [▶]
}
]

see , in this array videos has null , but i want following array

array:8 [▼

"music" => Collection {#872 ▼
#items: array:69 [▶]
}
"meditation" => Collection {#869 ▼
#items: array:1 [▶]
}

]

when the key value is null then remove it from array. i tried array_filter($array); but not get any results. plase help me



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3m71WoG
via IFTTT

تعليقات

المشاركات الشائعة من هذه المدونة

I am unable to figure out how to create payment collection request, after a form has been submitted in laravel

laravel, mysql transaction not working after failed one time