Removal of laravel 4.2+ array_where() function and use native php function