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

Add @auth blade component #20087

Merged
merged 5 commits into from
Jul 17, 2017
Merged

Add @auth blade component #20087

merged 5 commits into from
Jul 17, 2017

Conversation

m1guelpf
Copy link
Contributor

@m1guelpf m1guelpf commented Jul 15, 2017

I find myself writing @if(Auth::check()) in blade lots of times. This Pull Request adds a @auth blade directive to simplify this.

@taylorotwell
Copy link
Member

I shouldn't be able to do @auth(api)... it should be @auth('api')

@akoury
Copy link

akoury commented Sep 5, 2017

@taylorotwell @themsaid do you like the idea of having, for example, @auth($comments->count() > 1), in a way that works like an @if(Auth::check() && $posts->count() > 1) in a single command?, I know the parameter is currently a string for a guard, so we could check if it is not a string, then add the parameter as a second check

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