@cawex Just do an AJAX request with the notification’s ID. You should have authorisation preventing users from dismissing other users’ notifications. As this is updating a notification resource, you should also be performing it as either a POST or PUT rather than a GET request.
Apr 14, 2016
2
Level 7
Possible to send Flash Session from view to Controller?
Hello
So i want to clear a notification when someone clicks on it in the view, but i somehow need to send which ID the notification is, to the controller, i was thinking if it was possible to generate a flash session in the view, and then retrive it in the Controller? I dont wanna do it in the url, because that would be to easy to manipulate all the other notifications.
For example:
<a href="{{ url($notify->url, [Session::flash('test', $notifty->id)])) }}"> <h4 class="item-title">{{$notify->text}} </h4></a>
or
{{ url($notify->url)->with(Session::flash('test', $notifty->id)) }}"
Anything like this possible?
Please or to participate in this conversation.