Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Return $this from login() to allow for chaining #38

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

Open
grantholle wants to merge 1 commit into codecasts:develop
base: develop
Choose a base branch
Loading
from grantholle:master

Conversation

Copy link

@grantholle grantholle commented May 25, 2018

I find myself wanting to do $auth->login($user)->issue() instead of multiple lines

phillip-elm reacted with thumbs up emoji
Copy link
Member

@grantholle even though I agree that would be a single line beauty, the login method on other guard drivers don't behave like this.

I guess they return either the user or boolean.

The token issue is the second step, for an already authenticated user.

Since it does not affect very much other stuff, I'll merge it, but I'll keep it open for a while to include this on a next release, to avoid breaking BC.

Thank you!

@hernandev hernandev changed the base branch from master to develop August 26, 2018 03:43
Copy link
Member

Also, changed the target branch to develop. master is release only. Thanks

Copy link

jakewtaylor commented Mar 7, 2019
edited
Loading

Could you not just use the tap() helper method?

tap($auth)->login($user)->issue();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /