F
Filament2mo ago
niels

$recordRouteKeyName does not apply to table row on-click and edit action

I've set protected static ?string $recordRouteKeyName = 'uid'; (which is a public identifier in favor of incremental identifier) on my Product resource. http://127.0.0.1:8000/products/01JABFVZ0BP27NBRZ4X0RF7A9N/edit now works as expected, but the table row and EditAction both still link to http://127.0.0.1:8000/products/2/edit on-click What am I missing here?
1 Reply
niels
nielsOP2mo ago
I can do
->actions([
Tables\Actions\EditAction::make()
->url(fn ($record) => static::getUrl('edit', ['record' => $record->uid])),
])
->actions([
Tables\Actions\EditAction::make()
->url(fn ($record) => static::getUrl('edit', ['record' => $record->uid])),
])
But I'm not certain if this is the correct and safe approach
Want results from more Discord servers?
Add your server