Solution:1
You are free to use it with {{ }}
.
{{ Auth::check() ? 'yes' : 'no' }}
Solution:1
You are free to use it with {{ }}
.
{{ Auth::check() ? 'yes' : 'no' }}
Solution:2
For Laravel 5 + php7, you should be using the null coalesce operator as explained in this Laravel News article, like so:
{{ $value ?? "Fallback" }}
Before the null coalescing operator, Blade handled the same problem with the “or” operator, which allows a default value when the first value isn’t set, separated by an “or”.