Skip to content

Instantly share code, notes, and snippets.

@adamcrampton
Created October 28, 2018 23:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamcrampton/5d448585cbd4c6dff30f88a47ddf4a5d to your computer and use it in GitHub Desktop.
Save adamcrampton/5d448585cbd4c6dff30f88a47ddf4a5d to your computer and use it in GitHub Desktop.
Nested Collection each looping
collect($locales)->each(function (string $locale) {
collect($fields)->each(function (Field $field) use ($locale)
$this->doSomeWork($locale, $field);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment