2021年1月18日星期一

how to use filter for a collection in laravel

Im trying to use filter() method for the collection in laravel 5.2. But the result returns the same result when I remove the filter() method. Please see my code below.

if(!empty(request('columns.1.search.value'))) {     $union->filter(function($item) {        return date_format(new \DateTime($item['SUBMITTED']), 'm/d/Y') == request('columns.1.search.value');     });  }  
https://stackoverflow.com/questions/65784972/how-to-use-filter-for-a-collection-in-laravel January 19, 2021 at 11:06AM

没有评论:

发表评论