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...

Комментарии • 13

  • @user85937
    @user85937 3 месяца назад +8

    Yes I keep changing this for every resource and it's easy to forget, Filament definitely needs a global setting for this.

  • @Voltra_
    @Voltra_ 3 месяца назад +6

    You could also make a trait with the redirection code and use it in the classes

  • @ricko13
    @ricko13 3 месяца назад +3

    thanks uncle Povilas 😊

  • @nurullahsl87
    @nurullahsl87 3 месяца назад +4

    after this, publishing stubs and change which class to be extend should be benefical as well

    • @askadj
      @askadj 3 месяца назад

      For my use case, this is the method that fits best

  • @shubhamc4
    @shubhamc4 3 месяца назад +3

    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?

  • @arshaviraghajanyan3966
    @arshaviraghajanyan3966 3 месяца назад

    This behavior I hate too:)) Thanks Povilas!

  • @GiuseppeMastrodonato
    @GiuseppeMastrodonato 3 месяца назад +2

    It's so annoying to do this for every resource.
    They should implement a global setting for this.

  • @globetrotterxxl7440
    @globetrotterxxl7440 3 месяца назад

    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?