Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $tags = Tag::whereIn('name', array('phone', '8th', 'apple'))->with('products')->get();
- $products = (collect($tags->pluck('products')))->collapse()->unique();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement