Move to laravel array helper function