© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
2 replies
StanProg

Redirect from Livewire component boot()

I have a Livewire component with a form and in the boot() method I conditionally redirect to the dashboard. Unfortunately that redirect() does not work (it's executed, but does not redirect) and the getFormSchema() gets executed, while it shouldn't. Can somebody point what I'm doing wrong?
Here's a sample code:
namespace App\Http\Livewire;
class XXX extends Component implements HasForms
{
    public function boot()
    {
        return redirect()->route('filament.pages.dashboard');
    }

    protected function getFormSchema(): array
    {
      // this gets executed
    }
}
namespace App\Http\Livewire;
class XXX extends Component implements HasForms
{
    public function boot()
    {
        return redirect()->route('filament.pages.dashboard');
    }

    protected function getFormSchema(): array
    {
      // this gets executed
    }
}
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

Custom redirect after login from livewire component
FilamentFFilament / ❓┊help
2y ago
LiveWire Redirect
FilamentFFilament / ❓┊help
2y ago
Redirect to livewire component doesnt trigger error
FilamentFFilament / ❓┊help
3y ago
Calling livewire component from xdata
FilamentFFilament / ❓┊help
17mo ago