Laravel - Request and Response
Which of the following is the correct way to add the value 'green' to the session with the key 'background' in Laravel?
put() method to store key-value pairs in the session.session()->put('key', 'value');. session()->put('background', 'green'); matches this exactly.put() is valid for storing session data [OK]15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions