I have a collection on which I use the where
method in order to get only the element that match like this:
myCollection->where('akey', $value);
When I try to transform this with the filter method, it fails:
myCollection->filter(function($value, $key){
if($key === 'akey' && $value === $aValue)
return true;
});
I try to use filter because I want to select items in the collection if theirs values are equals to multiple value. (where or Where or Where or Where basically).