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);