ideas
ideas copied to clipboard
Implementation of OrderByRaw method on Content Queries
It would be useful to have an implementation of the Laravel Query Builder 'orderByRaw' method on Statamic Content Queries. The current ordering methods are limited when trying to apply a custom order to query results.
For example being able to apply a defined order based on the returned results id:
$query->orderByRaw("FIELD(id, [2, 4, 7, 3, 9])")