You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix compiling queries that use orderByRaw with expressions (#57228)
* Fix compiling queries that use orderByRaw with expressions
This fixes an issue caused by the removal of automatic casting of Expression objects to strings in Laravel 10.
$sql = DB::table('users')
->select('id')
->orderByRaw(DB::raw('length(name) desc'))
->toSql();
fails without this change.
* Update src/Illuminate/Database/Query/Grammars/Grammar.php
* Add tests for compileOrders method in Grammar
0 commit comments