FilamentF
Filament10mo ago
Batman

Globally set redirect for create and edit forms

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

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
Was this page helpful?