Answer the question
In order to leave comments, you need to log in
Has - how about the other way around?
Get those records that do not have records with relationships?
Has helps us to get, for example, a user who has posts. And how to get a user who has no posts?
auth()->user()->posts()
->whereNotNull('bg')
->has('contents')
->get();
Answer the question
In order to leave comments, you need to log in
Lord helpers! Think before you answer if it's worth it. The author has 400 questions. You, not him, write his project.
PHPjedi for all your questions in the documentation there are answers, just don't be too lazy and open it. Did you find the has()
method somewhere? So why not find the opposite in the same place a little lower?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question