I would like to know what would be the best way to display a default value if the given value is not set. I have the following in a blade file (I can not guaranty that the key is set, it depends on a multitude of factors).
{{ $foo['bar'] }}
I would know if the following is the best way to go about it,
{{ (isset($foo['bar']) ? $foo['bar'] : 'baz' }}
or is there a better way to do this?
Thanks :)