标签: php laravel sql-order-by paginate
当我试图按功能或最新功能对用户列表进行排序时,它无效。
$scan_data = Scan::where(['profile' => 'public'])->with(['user'])->whereHas('user')->orderBy('scan.created_at', 'desc')->paginate();