@if (session()->has('messages'))
        {{ $messages = session()->get('message') }}
        @if ($messages[0] == 'success')
            <div class="alert alert-success">
                <i class="fa fa-exclamation-triangle"></i>
                <button type="button" class="close" data-dismiss="alert">&times;</button>
                Success message
                {{ $messages[1] }}
            </div>
        @elseif($messages[0] == 'danger')
            <div class="alert alert-danger">
                <i class="fa fa-exclamation-triangle"></i>
                <button type="button" class="close" data-dismiss="alert">&times;</button>
                Failed message
                {{ $messages[1] }}
            </div>
        @endif
@endif