Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.8] Add only method to Session #29107

merged 2 commits into from Jul 8, 2019


None yet
3 participants
Copy link

commented Jul 8, 2019

I see a lot of use cases where you would only want to retrieve some values from the session store instead of all values.
I commonly use the Arr::only method combined with session()->all() when for example wanting to set data on window for the frontend.

I've targeted 5.9 as it adds a new method to the Session interface.

Show resolved Hide resolved src/Illuminate/Session/Store.php Outdated
Show resolved Hide resolved src/Illuminate/Contracts/Session/Session.php Outdated

@nicoeg nicoeg changed the base branch from master to 5.8 Jul 8, 2019

@nicoeg nicoeg changed the title [5.9] Add only method to Session [5.8] Add only method to Session Jul 8, 2019

@taylorotwell taylorotwell merged commit ec4178b into laravel:5.8 Jul 8, 2019

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
continuous-integration/styleci/pr The analysis has passed

@nicoeg nicoeg deleted the nicoeg:session-only-method branch Jul 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.