SHARE
TWEET

Untitled

a guest May 25th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $options_collection = new Collection;
  2. foreach($p->variants as $variant) {
  3.             $options_collection->push([
  4.                 'variant_id' => $variant->id,
  5.                 'options_id' => $variant->options->map(
  6.                     function($item, $key) {
  7.                         return $item->option_id;
  8.                     }
  9.                 )
  10.             ]);
  11.         }
  12. return $options_collection;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top