@php($viewErrors = $errors ?? null)

@if ($viewErrors && $viewErrors->any())
  <div class="alert alert-danger alert-dismissible show fade">
    <div class="alert-body">
      <button class="close" data-dismiss="alert">
        <span>&times;</span>
      </button>
      <strong>Please fix the following:</strong>
      <ul class="mb-0 mt-2 pl-3">
        @foreach ($viewErrors->all() as $error)
          <li>{{ $error }}</li>
        @endforeach
      </ul>
    </div>
  </div>
@endif
