【发布时间】:2014-10-06 16:56:02
【问题描述】:
寻找刀片模板的三元运算符
@if(Auth::check()) ? yes : no @endif
似乎无法让它工作
@if(Auth::check()) yes @else no @endif
假设这个例子没有太多内容,只是好奇。
【问题讨论】:
-
我们可以在 laravel 刀片中嵌套三元运算符吗,因为它给出了意外的错误'['
标签: laravel ternary-operator blade