F
Filament14mo ago
Bryan

Redirect to livewire component doesnt trigger error

I am trying to redirect to a livewire component, but the error is not being shown. I fill the error based on a ErrorMessage livewire component This is what I am trying to do in the mount() of my OrderForm
if (Route::getRoutes()->match(Request::create(request()->session()->previousUrl()))->getName() === 'orders.confirmation') {
$this->dispatch(
event: 'error',
error: 'Er is iets misgegaan met de betaling. Probeer het later opnieuw.'
);
}
if (Route::getRoutes()->match(Request::create(request()->session()->previousUrl()))->getName() === 'orders.confirmation') {
$this->dispatch(
event: 'error',
error: 'Er is iets misgegaan met de betaling. Probeer het later opnieuw.'
);
}
Is this the right moment to do the dispatch?
1 Reply
Patrick Boivin
Patrick Boivin14mo ago
What are you trying to do exactly? Can you describe the result you want in a plain sentence?
Want results from more Discord servers?
Add your server