Skip to content
Advertisement

How to submit multiple requests to the function to send all submitted requests

I’m trying to submit several requests to a function that writes them to a session that then returns them

here I submit the data to the function

JavaScript

this is the function we use

JavaScript

call session

JavaScript

when it executes the script it returns the last request only – $this->Notification->build('error', 'Test1', 'danger', 'bottom-left', 0, 'true');

Advertisement

Answer

You can pass an array but otherwise what you are doing is overwriting the session keys value each time, so modofy the methid a little and pass an array to the setFlashData()

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement