F
F
freeeeez2018-05-28 12:11:44
Laravel
freeeeez, 2018-05-28 12:11:44

How to sort by user id in Laravel?

It is necessary to sort the request so that the first line is the line related to the user $id and the rest in any order.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
I
iljaGolubev, 2018-05-29
@freeeeez

Take a look here , it might give you some ideas...

D
Dmitry Kim, 2018-05-28
@kimono

It is necessary to sort the request so that the first line is the line related to the user $id and the rest in any order.

This is not a question, but some kind of brain explosion. Please reformulate.

O
Oleh, 2018-05-28
@linkinkov

Why not sort after getting a selection from the database? ORDER BY on a specific key will not return the result "first id, then all the others"

I
ipokos, 2018-05-28
@ipokos

sort by user id
sort or select specific id?
If you need a specific user, why take the entire sample?
$userModel->find($id);
so not?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question