Skip to content

Add @auth blade component - #20087

Merged
taylorotwell merged 5 commits into
laravel:5.4from
m1guelpf:auth-blade
Jul 17, 2017
Merged

Add @auth blade component#20087
taylorotwell merged 5 commits into
laravel:5.4from
m1guelpf:auth-blade

Conversation

@m1guelpf

@m1guelpf m1guelpf commented Jul 15, 2017

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Member

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

@akoury

akoury commented Sep 5, 2017

Copy link
Copy Markdown

@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