Skip to content

[5.8] Add only method to Session - #29107

Merged
taylorotwell merged 2 commits into
laravel:5.8from
nicoeg:session-only-method
Jul 8, 2019
Merged

[5.8] Add only method to Session#29107
taylorotwell merged 2 commits into
laravel:5.8from
nicoeg:session-only-method

Conversation

@nicoeg

@nicoeg nicoeg commented Jul 8, 2019

Copy link
Copy Markdown

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.

Comment thread src/Illuminate/Session/Store.php Outdated
Comment thread src/Illuminate/Contracts/Session/Session.php Outdated
@nicoeg
nicoeg changed the base branch from master to 5.8 July 8, 2019 13:32
@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
@nicoeg
nicoeg deleted the session-only-method branch July 8, 2019 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants