© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
3 replies
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
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Infolist ViewResource Test
FilamentFFilament / ❓┊help
3y ago
TextInput default value at ViewResource page
FilamentFFilament / ❓┊help
3y ago
Add new record with RelationManager from a ViewResource
FilamentFFilament / ❓┊help
2y ago
How to create pdf from a ViewResource Page
FilamentFFilament / ❓┊help
2y ago