Open divdax opened 2 years ago
Hi, I had the same issue, but debugging how the query is built, I discorver that you can put alias to the order, and that alias are translate to correct JSON order from eloquent.
This is my code:
protected array $sortableAs = [
'name->en',
'name->es',
];
@sortablelink('name->en')
With this, eloquent generates this:
select * from exercises order by json_unquote(json_extract(name, '$."en"')) asc limit 15 offset 0
Hi,
i tried to sort by name column (datatype: json) with:
The database query doesn't contain any
order by
.