M
M
myxasa2017-07-21 10:56:36
Laravel
myxasa, 2017-07-21 10:56:36

How to make hard with in eloquent?

There is a
Trunk::with("domain")->where('owner_id', 20)->get();
if there is no domain, then it will be domain: null
and you need to make sure that if there is no domain, then do not select anything at all
without crutches

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
cha-cha, 2017-07-21
@cha-cha

has()
https://laravel.com/docs/5.4/eloquent-relationship...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question