V
V
Vatrush2019-05-21 11:07:15
Laravel
Vatrush, 2019-05-21 11:07:15

How to compose min max eloquent query?

$articles = Article::where('name',$request->name)
                    ->orderBy('price','desc')
                    ->paginate(30);

How to add min price and max price values ​​to this query?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konata Izumi, 2019-05-21
@Vatrush

whereBetween

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question