Answer the question
In order to leave comments, you need to log in
How to write a database query in Laravel that excludes the data of a related table?
Hello!
The first user table is the second post, where there is a linking column user_id, how to write a query to get all the rows from user, and skip the rows associated with another table?
THX)
Answer the question
In order to leave comments, you need to log in
$users = User::doesnthave('fuelprices')->with('fuelprices')->get();
PashaNedved gave me the correct answer User::doesnthave('fuelprices')->get()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question