I want to show the ProductAttributes
relation based on the product's attribute_status
column.
Here is my code:
Product::with('productImages', 'productReviews', 'user.vendors', 'subchildcategories', 'ProductAttributes')
->where('category_id', $request->category_id)
->where('products.status', 1)
->get();