diff --git a/app/Filament/App/Resources/ServerResource/Pages/ListServers.php b/app/Filament/App/Resources/ServerResource/Pages/ListServers.php index ae9a0fbdfc..2647b41c86 100644 --- a/app/Filament/App/Resources/ServerResource/Pages/ListServers.php +++ b/app/Filament/App/Resources/ServerResource/Pages/ListServers.php @@ -25,6 +25,8 @@ public function table(Table $table): Table ->paginated(false) ->query(fn () => $baseQuery) ->poll('15s') + ->reorderable('sort') + ->defaultSort('sort') ->columns([ Stack::make([ ServerEntryColumn::make('server_entry') diff --git a/database/migrations/2025_01_17_090938_add_sort_to_servers.php b/database/migrations/2025_01_17_090938_add_sort_to_servers.php new file mode 100644 index 0000000000..2fe4c22053 --- /dev/null +++ b/database/migrations/2025_01_17_090938_add_sort_to_servers.php @@ -0,0 +1,28 @@ +unsignedSmallInteger('sort')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('servers', function (Blueprint $table) { + $table->dropColumn('sort'); + }); + } +};