Skip to content
Advertisement

Tag: session-variables

Is it possible to store an array as flash data in Laravel?

I have been looking around for a way of doing this. I know it is possible to store an array in the session with the following: Session::push(‘user.teams’, ‘developers’); Is it possible to do the same but with flash data? Something like Session::flashpush(‘user.teams’, array(‘developers’, ‘designers’)); would be great. The usecase for me at this moment is primarily the following: Session::flash(‘flash_message’, $validator->messages());

session wiped out between pages

I’m making a login page and for some reason the session will not persist between where I set it and the page where I am forwarding to. I can comment out the header in the page where the session was initialized and see that the session has the data in it. However, when I do a print_r in the target

Advertisement