How to get all the child models, including remote with soft delete?

Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
In online store there are classes:
Order, Order_product, Product.

Order contains
public function order_products() { return $this->hasMany(Order_product::class); }

Order_product contains
public function product() { return $this->it's belongsto(Product::class); }

Information about the items in the order displayed in this way:

The fact that the product can be deleted (soft delete), but still remain in the orders. In this case, to order
it order_products, so that each order_product contained in a product even if it is deleted?
by | 11 views

1 Answer

0 like 0 dislike

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
4 answers
0 like 0 dislike
2 answers
asked Aug 9, 2019 by RMate
0 like 0 dislike
1 answer
asked May 3, 2019 by singhtless
110,608 questions
257,186 answers
36,634 users