0

This the remaining part of my query but whenever i use the below code for ordering by type in the sequel its gives error :

exception: the $sort key specification must be an object

Query Part :

$result =$query->orderByRaw("FIELD('Type', \"UNALLOCATEDPAYMENT\", \"UNALLOCATEDCREDIT\", \"OD\")")->paginate(10);
Veerendra
  • 2,562
  • 2
  • 22
  • 39
rahul
  • 776
  • 5
  • 30
  • It seems that orderByRaw is not implemented in Jenssegers's builder, so you need to open an issue on github (https://github.com/jenssegers/laravel-mongodb) – aeryaguzov Apr 13 '16 at 12:02
  • i have added the issue https://github.com/jenssegers/laravel-mongodb/issues/820 – rahul Apr 20 '16 at 08:05

0 Answers0