how are you storing the data on the session?
Feb 6, 2020
4
Level 8
Cant override session flash messages
I am adding a flash messages in case of a successful login , after login I am checking some conditions and I am attempting to override the initial message but with no luck , I end up with two flash messages the initial one and the one added if in case one of the condition where true (which I am checking in the middleware) , I tried a couple of things including:
session()->forget('flash_notification');
session()->regenerate();
session()->pull('flash_notification');
but whenever I add the flash('new message in the middleware') both old and new messages get displayed
Level 8
@fylzero @ahmeddabak Thank you for your replies :D I ended up using the
flash()->clear();
it did the trick.
Please or to participate in this conversation.