From 0e8632706570f5411bde76c606c7441e076bd097 Mon Sep 17 00:00:00 2001 From: Martijn Gussekloo <1426964+mgussekloo@users.noreply.github.com> Date: Mon, 10 Aug 2020 12:11:10 +0200 Subject: [PATCH] Assume the default order_column_name Spatie uses 'order_column' as the default order_column_name, so I think it makes sense to assume the default to be 'order_column' unless explicitly set. --- src/Orderable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Orderable.php b/src/Orderable.php index ae79d16..af252f5 100644 --- a/src/Orderable.php +++ b/src/Orderable.php @@ -122,6 +122,6 @@ public static function modelOrderByFieldAttribute($model) return; } - return $model->sortable['order_column_name'] ?? null; + return $model->sortable['order_column_name'] ?? 'order_column'; } }