Answer the question
In order to leave comments, you need to log in
Why is the request broken?
$bans= Blacklist::with(['banned' => function ($query) use ($text, $order, $type) {
$query->whereRaw("CAST(ip AS TEXT) ILIKE '%$text%'")
->orWhereRaw("CAST(spec_id AS TEXT) ILIKE '%$text%'")
->orWhere('email', 'like', '%' . $text . '%')
->orWhere('name', 'like', '%' . $text . '%')
->orderBy($type, $order);
}, 'bannedBy'])->get();
dd($bans);
>orWhere('name', 'like', '%' . $text . '%')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question