As far as I know, the @
tags in blade just compile to <?php ... ?>
You could look into writing a blade directive though.
The syntax in 5.0 is a little gnarly with regexps, but it's been cleaned up in 5.1.
Or filter the array first?
@foreach( array_filter($field->options, function($option){ return $option->deleted != 1; }) as $option )
You could wrap the array_filter in a helper if that's too ugly for you:
@foreach( filter($field->options) as $option )
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community