4
4
4sadly2020-05-18 21:10:10
PHP
4sadly, 2020-05-18 21:10:10

How to search across multiple columns in Eloquent?

There is a where method I read the documentation, but could not understand how to find a string by several columns, for example, by status and author, how can this be done?
$orders = Order::where('status', '=', 0)->get();

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
LaraLover, 2020-05-18
@4sadly

where(['status'=>1, 'author'=>'king'])

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question