Filtering Eloquent collection data with $collection->filter()
https://stackoverflow.com/questions/21974402/filtering-eloquent-collection-data-with-collection-filter
QuestionAnswer228edited Nov 17, 2023 at 20:42The collection's filter method calls array_filter on the underlying array, which, according to the PHP docs, preserves the array keys. This then results in your array being converted to a JavaScript object instead of an array.
DA: 45 PA: 76 MOZ Rank: 75 Up or Down: Up