From 4c2278a7f2b23a1410e83f90758b6436907f2045 Mon Sep 17 00:00:00 2001 From: Scai <59282365+alexevladgabriel@users.noreply.github.com> Date: Fri, 12 Apr 2024 19:09:01 +0300 Subject: [PATCH] fix route missing on database hosts --- app/Filament/Resources/DatabaseHostResource.php | 1 - app/Models/DatabaseHost.php | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Filament/Resources/DatabaseHostResource.php b/app/Filament/Resources/DatabaseHostResource.php index 0d31be223..3693f161f 100644 --- a/app/Filament/Resources/DatabaseHostResource.php +++ b/app/Filament/Resources/DatabaseHostResource.php @@ -72,7 +72,6 @@ class DatabaseHostResource extends Resource Tables\Columns\TextColumn::make('host') ->searchable(), Tables\Columns\TextColumn::make('port') - ->numeric() ->sortable(), Tables\Columns\TextColumn::make('username') ->searchable(), diff --git a/app/Models/DatabaseHost.php b/app/Models/DatabaseHost.php index 06c13e1ed..e06c3b957 100644 --- a/app/Models/DatabaseHost.php +++ b/app/Models/DatabaseHost.php @@ -65,6 +65,11 @@ class DatabaseHost extends Model ]; } + public function getRouteKeyName(): string + { + return 'id'; + } + /** * Gets the node associated with a database host. */