Answer the question
In order to leave comments, you need to log in
Why does eloquent swear?
I'm trying to display matches like this:
(I use orm separately from Laravel, because the task is like this)
public function myMethod()
{
$user = new Users();
$user->whereHas('users',function ($q)
{
$q->where('name','admin');
})->get();
}
Answer the question
In order to leave comments, you need to log in
$user = new Users()->where('name','admin')->get();
apparently you wanted to do it, from somewhere you just got whereHas and for some reason shoved it here.
the use of the laravel docks in which eloquent is described does not cancel this, everything is painted there subroutinely.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question