0

I want to order the query value based on status order 8,1,2,3,4,5,6,7.I have the query.Is is possible to sort by given value. I want to order the query result in the given order 8,1,2,3,4,5,6,7

$query->orderBy('status','DESC')  //order by 8,1,2,3,4,5,6,7
->get();
user3386779
  • 6,325
  • 17
  • 56
  • 121

1 Answers1

3

you can use orderByRaw() method

adrianriyadi
  • 338
  • 1
  • 4
  • 16