Filament: Create/Edit Form Redirect to Index
HTML-код
- Опубликовано: 8 сен 2024
- Don't you hate that Filament doesn't redirect to the table after submitting the create/edit form? Let me show you how I customize it.
More Filament examples on our website: filamentexampl...
Yes I keep changing this for every resource and it's easy to forget, Filament definitely needs a global setting for this.
You could also make a trait with the redirection code and use it in the classes
thanks uncle Povilas 😊
after this, publishing stubs and change which class to be extend should be benefical as well
For my use case, this is the method that fits best
I haven't tried it but can we create a trait like RedirectToResourceIndex with getRedirectUrl function and use it in controller? this way you don't have to create multiple base classes?
Yes probably, good point.
This behavior I hate too:)) Thanks Povilas!
It's so annoying to do this for every resource.
They should implement a global setting for this.
I wonder if I could change any stubs and create a starter template with all the first time changes and then start a new project with composer create-project?
You can try to do that, yes.