After digging, I found the solution. In /resources/views/vendor/flash/message.blade.php, I had the following code which was working for Laravel 5.1
@if (Session::has('flash_notification.message'))
@if (Session::has('flash_notification.overlay'))
@include('flash::modal', ['modalClass' => 'flash-modal', 'title' => Session::get('flash_notification.title'), 'body' => Session::get('flash_notification.message')])
@else
<div class="alert alert-{{ Session::get('flash_notification.level') }}">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
{{ Session::get('flash_notification.message') }}
</div>
@endif
@endif
But since there is been a change with Laracasts/flash view partial used to display messages, I put the new code in the file:
@foreach ((array) session('flash_notification') as $message)
@if ($message['overlay'])
@include('flash::modal', [
'modalClass' => 'flash-modal',
'title' => $message['title'],
'body' => $message['message']
])
@else
<div class="alert
alert-{{ $message['level'] }}
{{ $message['important'] ? 'alert-important' : '' }}"
role="alert"
>
@if ($message['important'])
<button type="button"
class="close"
data-dismiss="alert"
aria-hidden="true"
>×</button>
@endif
{!! $message['message'] !!}
</div>
@endif
@endforeach
{{ session()->forget('flash_notification') }}
It's working perfectly now.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community