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

[8.x] Add more readable missing method to Session\Store #36937

Merged
merged 2 commits into from
Apr 11, 2021

Conversation

schmidfelix
Copy link
Contributor

This PR adds a new missing() method to Illuminate\Session\Store so we can check for missing keys in a more readable way.

// Instead of
if (!Session::has('key') {
    // ...
}

// We can do
if (Session::missing('key') {
    // ...
}

Like the missing method on the filesystem, there is no much logic behind the method, and it shouldn't add too much maintenance overload.

@GrahamCampbell GrahamCampbell changed the title Add more readable missing method to Session\Store [8.x] Add more readable missing method to Session\Store Apr 10, 2021
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.

2 participants