Laravel 4.2 blade: check if empty
try this:
@if ($value !== '')
{{ HTML::link($value,'some text') }}
@endif
I prefer the @unless
directive for readability in this circumstance.
@unless ( empty($school->website) )
<a href="{{ $school->website }}" target="_blank">{{ $school->website }}</a>
@endunless
With php 7, you can use null coalescing operator. This is a shorthand for @m0z4rt's answer.
{{ $variable ?? 'default' }}