Quizzes: Laravel • The Basics • Sessions

The push method may be used to push a new value onto a session value that is an array. For example, if the user.teams key contains an array of team names, you may push a new value onto the array like so:

5 Remaining
$request->session()->push('user.teams', 'developers');
The push method may be used to push a new value onto a session value that is an array. For example, if the user.teams key contains an array of team names, you may push a new value onto the array like so:
Tip: Carefully read the questions, I may be trying to trip you up with key words or phrases.

Permalink: https://rappasoft.com/quizzes/laravel/sessions/681654d3-7ecb-4a34-b441-80f5e19a4245

Find this useful? Consider sponsoring me on GitHub
You can also get here with laravel-quizzes.com