© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•12mo ago•
4 replies
Batman

Globally set redirect for create and edit forms

Is there a way to globally set redirection for forms to
IndexResource
IndexResource
instead of having to set it in every
CreateResource
CreateResource
and
EditResource
EditResource
?

protected function getRedirectUrl(): string
{
    return $this->previousUrl ?? $this->getResource()::getUrl('index');
}
protected function getRedirectUrl(): string
{
    return $this->previousUrl ?? $this->getResource()::getUrl('index');
}
Solution
I don't think so. Maybe you could create a trait using this code and use it where you need it
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

Different forms for create and edit
FilamentFFilament / ❓┊help
3y ago
Globally set single column for forms/infolists
FilamentFFilament / ❓┊help
6mo ago
Width of create and edit forms
FilamentFFilament / ❓┊help
2y ago
Edit forms
FilamentFFilament / ❓┊help
3y ago