How to write Laravel's blade template if expression with two conditions?
天蓬老师
天蓬老师 2017-05-16 16:50:54
0
1
563

How to write Laravel's blade template if expression with two conditions?

This is a condition:

@if (Auth::check())
    
@endif

Question:
If there are two conditions, "and" and "or", how should I write them?

//“或”这样写可以吗?“与”呢?
@if (Auth::check()|Entrust::hasRole('seller'))
    
@endif
天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(1)
曾经蜡笔没有小新
@if (Auth::guest()|| Entrust::hasRole('seller'))

@if (Auth::guest()&& Entrust::hasRole('seller'))

This is the same as the normal AND or in PHP

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template