I'm using messages
to add flash messages to the template (just as you'd expect).
The problem I have is that if you double click a link to a page that generates a message then the message appears twice.
I am using the message to tell the user I have redirected them from where they were expecting to go. They don;t need the same message twice.
I understand the logic here but am wondering how I can remove duplicated messages.
- click url
- message generated, saved in storage
- click url again before page renders
- second message generated, saved in storage
- response adds all messages from storage
- renders with two messages
Ultimately I would like this to be a middleware
so it can cover off all requests.