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:
1 Reply
Try it in mount() instead of boot(). Boot might be too early for the redirect.