sometimes $structures array has the null value the same code for other variable is working fine but not in this case.
@foreach($structures ?? [] as $item)
{{ $item }}
@endforeach
I resolved the issue by adding ()
around $structures ?? []
expression.
@foreach(($structures ?? []) as $item)
{{ $item }}
@endforeach