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 k
While Chris B's answer is perfectly valid; I felt perhaps this is a question that can have an alternative answer. Some would prefer not to make their controllers "fat" and in this case at least, the use of a Presenter could be the answer you seek for allowing a great deal of flexibility in your application views.
Take a look at the following project/package on Github. The readme is pretty robust with a number of examples to get you going.
It will allow you to do just what you asked and simply call
{{ $foo['bar'] }}
in your view.