In Smarty Templates I can simply check a value in my case an array and if empty I can output a default value like this:
{$smarty.session.foo['bar']|default:"empty"}
How can I simply do the same in laravel blade without nested @if statements?
@if(session()->has('foo'))
@if( ! empty( session('foo')->bar ) )
{{ session('foo')->bar }}
@else
empty
@endif
@endif
How can I do this shorthand?