I’m trying to filter account in laravel.1 user can have many accounts with different format. It doesnt seem to work.The query:
$accounts = $user->account()->where('account_no','like', ['34%','35%','3303%','3304%'])->get();
i’m wondering if this can be done or not?
3
Answers
You can’t do that. For each condition you need a single WHERE condition, like this:
That should do it.
You can try this workaround :
Try it by
RAW Query
,Like this: