@if (session()->has('error'))
{!! session('error') !!}
@endif

References

@foreach($reference as $index => $edu)
References #{{ $index + 1 }}
@if($index > 0) @endif
@endforeach