阅读(1863)
赞(1)
Laravel 8 orderByRaw
2021-07-07 09:14:22 更新
orderByRaw 方法可用于将原生字符串设置为 order by 语句的值:
$orders = DB::table('orders')
->orderByRaw('updated_at - created_at DESC')
->get(); orderByRaw 方法可用于将原生字符串设置为 order by 语句的值:
$orders = DB::table('orders')
->orderByRaw('updated_at - created_at DESC')
->get(); Copyright©2023 字节宝字节宝| |
违法和不良信息举报电话:|举报邮箱:3111859717@qq.com
