Я создал флэш-сообщение на странице laravel с помощью контроллера. Хорошо показывает, но необходимо добавить таймаут во флэш-сообщении
if($location_vaidation>0){
$material_details->location_id=$requested_location;
}
else{
Session::flash('success', 'please fill the form with valid data');
return Redirect::to('request');
exit;
}
На странице просмотра
@if( Session::has("success") )
<div class="alert alert-success alert-block" role="alert">
<button class="close" data-dismiss="alert"></button>
{{ Session::get("success") }}
</div>
@endif
@if( Session::has("error") )
<div class="alert alert-danger alert-block" role="alert">
<button class="close" data-dismiss="alert"></button>
{{ Session::get("error") }}
</div>
@endif
<div class="flash-message"></div>