F
Filament16mo ago
thorrdu

Is there default way to display error/message upon redirect ?

I'm new to filament and geting back to laravel after a few years ( stuck on old 5.6 php projects ). I innoctently tried this line:
return redirect()->route('filament.admin.resources.orders.index')->with('error', 'Erreur ligne '.$rowOrder.' : Veuillez renseigner le nom ou le numéro de phase du bénéficiaire');
return redirect()->route('filament.admin.resources.orders.index')->with('error', 'Erreur ligne '.$rowOrder.' : Veuillez renseigner le nom ou le numéro de phase du bénéficiaire');
Correctly redirected but nothing was of course displayed...
Solution:
Depends on how you have structured your Filament/Laravel pages but you may need to manually show custom errors from session('error') in Blade
Jump to solution
3 Replies
Solution
Povilas K
Povilas K16mo ago
Depends on how you have structured your Filament/Laravel pages but you may need to manually show custom errors from session('error') in Blade
Povilas K
Povilas K16mo ago
Filament can't automatically guess that there is an 'error' variable and magically show it for you, someone else may call it 'message' or 'notice'
thorrdu
thorrduOP16mo ago
Thanks dude. That's what I originaly thought. But as copilot could not stop giving me this example in almost every proposal. I thought it could be something like this existing. But I guess that's just how most people name their error/message variables^^
Want results from more Discord servers?
Add your server