79728707

Date: 2025-08-07 14:13:52
Score: 1
Natty:
Report link

What I understand is you need user products + global products.

So in this case we need a OR condition where('isGlobal', 1)

$products = Product::where('user_id', $user->id)
->orWhere('isGlobal', 1)
->get();

result: this will give me all specific user productrs + gloabl products

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): What I
  • Low reputation (0.5):
Posted by: Kamran Khalid