@if($error = session()->pull('error'))
    <div class="alert alert-danger alert-dismissable">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
        <h4><i class="icon fa fa-ban"></i>{{ array_get($error->get('title'), 0) }}</h4>
        <p>{!!  array_get($error->get('message'), 0) !!}</p>
    </div>
@elseif ($errors = session()->pull('errors'))
    @if ($errors->hasBag('error'))
      <div class="alert alert-danger alert-dismissable">

        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
        @foreach($errors->getBag("error")->toArray() as $message)
            <p>{!!  array_get($message, 0) !!}</p>
        @endforeach
      </div>
    @endif
@endif

@if($success = session()->pull('success'))
    <div class="alert alert-success alert-dismissable">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
        <h4><i class="icon fa fa-check"></i>{{ array_get($success->get('title'), 0) }}</h4>
        <p>{!!  array_get($success->get('message'), 0) !!}</p>
    </div>
@endif

@if($info = session()->pull('info'))
    <div class="alert alert-info alert-dismissable">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
        <h4><i class="icon fa fa-info"></i>{{ array_get($info->get('title'), 0) }}</h4>
        <p>{!!  array_get($info->get('message'), 0) !!}</p>
    </div>
@endif

@if($warning = session()->pull('warning'))
    <div class="alert alert-warning alert-dismissable">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
        <h4><i class="icon fa fa-warning"></i>{{ array_get($warning->get('title'), 0) }}</h4>
        <p>{!!  array_get($warning->get('message'), 0) !!}</p>
    </div>
@endif