python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Total Count with eloquent
I have a two table users and orders . i want to get users with Total Orders Count. How can I do this with eloquent?
Here is my query
User::with('orders')->where('status','active')->get();
Nasir Awan
Votes: 0
Answers: 1
Laravel Query with Relation and Where/orWhere for Search field
there are 2 models. Customers & Locations.
In a location single page, it should now be possible to display all customers from the location and filter them according to customer attributes.
The pro...
Daniel H
Votes: 0
Answers: 1
Cannot get pivot id
I have a pivot table which handle the following tables relationship:
riskareas: one riskarea belongs to many riskfields
riskfields: one riskfield has many riskarea
So:
As you can see the riskarea_r...
sfarzoso
Votes: 0
Answers: 1
Cannot use belongsToMany to sync pivot data
I have a pivot table called invite_riskarea_riskfield which defined a relationship with the invite table:
What I need to do is sync multiple invite_riskarea_riskfield permissions (insert, edit, view)...
sfarzoso
Votes: 0
Answers: 1