F
Filament11mo ago
Tur

ViewResource incorrect url generated

I have My resource and after specific condition is met the canEdit function in Resource returns false and then i want to redirect user to ViewResouce. I have a table action for it: Action::make('link') ->url(fn(Model $record) => self::getUrl('view', ['record' => $record]))->openUrlInNewTab() ->label('Show'), but it won't redirect to the correct resource - it adds a $_GET parameters and the url looks like /resource/%7Brecord?record=1 instead of /resource/1. Am i missing something here ?
Solution:
Typo in view route declaration, had '/{record' (missing })
Jump to solution
1 Reply
Solution
Tur
Tur11mo ago
Typo in view route declaration, had '/{record' (missing })
Want results from more Discord servers?
Add your server