Link to related record in RelationManager list table

I've a Vehicle Resource and Duty Resource, I've created a VehicleRelationManager to link to the Duty Resource. In the table I'm showing basic information, but would like to be able to link directly to the Duty Resource view page from the table in the Vehicle Relation Manager. Hopefully this makes sense and someone has an idea as to what I can do on this.
Solution:
Bit of searching a found a solution, for others that may be wondering
->actions([
Action::make('view')->url(fn (Duty $record): string => DutyResource::getUrl('view', ['record' => $record]))
]);
->actions([
Action::make('view')->url(fn (Duty $record): string => DutyResource::getUrl('view', ['record' => $record]))
]);
...
Jump to solution
1 Reply
Solution
Mark Railton
Mark Railton16mo ago
Bit of searching a found a solution, for others that may be wondering
->actions([
Action::make('view')->url(fn (Duty $record): string => DutyResource::getUrl('view', ['record' => $record]))
]);
->actions([
Action::make('view')->url(fn (Duty $record): string => DutyResource::getUrl('view', ['record' => $record]))
]);
Want results from more Discord servers?
Add your server