A
A
Alex Kizyma2020-05-03 19:13:23
Laravel
Alex Kizyma, 2020-05-03 19:13:23

How to make a Laravel data filter?

there is a status field and the value there is 1, 2, 3, 4

this way do not roll because orderBy wants desc or asc
$model::query()->orderBy('status', 1)->get();

how can I do it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question