Skip to content

Instantly share code, notes, and snippets.

@wouterj
Created April 4, 2015 17:26
Show Gist options
  • Save wouterj/111ace83ec150b9081a5 to your computer and use it in GitHub Desktop.
Save wouterj/111ace83ec150b9081a5 to your computer and use it in GitHub Desktop.
->then(function ($n) {
$options = array();
foreach ($n as $name => $value) {
if ('type' === $name) {
continue;
}
$options[$name] = $n[$name];
unset($n[$name]);
}
$n['options'] = $options;
return $n;
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment