Skip to content

Commit

Permalink
fix relation manager url generation
Browse files Browse the repository at this point in the history
urls should not be hardcoded so changed it to a commonly used function
  • Loading branch information
AidasK authored Oct 20, 2024
1 parent 3d66fb2 commit 050b195
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Filament\Tables\Table;
use Lunar\Admin\Filament\Resources\OrderResource;
use Lunar\Admin\Support\RelationManagers\BaseRelationManager;
use Lunar\Admin\Filament\Resources\OrderResource\Pages\ManageOrder;
use Lunar\Models\Order;

class OrdersRelationManager extends BaseRelationManager
Expand All @@ -18,7 +19,7 @@ public function getDefaultTable(Table $table): Table
OrderResource::getTableColumns()
)->actions([
Tables\Actions\Action::make('viewOrder')
->url(fn (Order $record): string => route('filament.lunar.resources.orders.order', $record)),
->url(fn (Order $record): string => ManageOrder::getUrl(['record' => $record])),
]);
}
}

0 comments on commit 050b195

Please sign in to comment.