getTableRecordUrlUsing - in RelationManager wrong argument.

I was using 3.0.39 After updating to 3.0.69 callback injects $record as Table instead of model My code (in a RelationManager)
protected function getTableRecordUrlUsing(): ?Closure
{
return function (Model $record): string {
return ShopCategoryResource::getUrl('edit', ['record' => $record]);
};
}
protected function getTableRecordUrlUsing(): ?Closure
{
return function (Model $record): string {
return ShopCategoryResource::getUrl('edit', ['record' => $record]);
};
}
I don't know if it's intended or not but it does no longer reflect the doc at https://filamentphp.com/docs/2.x/tables/getting-started#record-urls
Solution:
Well, just noticed that I looked at 2.0 doc
Jump to solution
2 Replies
Solution
Fabien K.
Fabien K.10mo ago
Well, just noticed that I looked at 2.0 doc
Fabien K.
Fabien K.10mo ago
Nevermind, I got the wrong doc. The old v2 way was working on v3 until an undetermined version The correct way to do this now is here https://filamentphp.com/docs/3.x/tables/advanced#record-urls-clickable-rows