Instead of
@if(session('error')) <div class="alert alert-danger"> {{session('error')}} </div> @elseif(session('success')) <div class="alert alert-success"> {{session('success')}} </div> @endif
Do like this
@foreach($errors->all() as $error) <p class="alert alert-danger">{{ $error }}</p> @endforeach @if(session('status')) <div class="alert alert-success"> {{ session('status') }} </div> @endif
Or
<div class="alert alert-danger"> <ul> @foreach($errors->all() as $error) <li>{{$error}}</li> @endforeach </ul> </div>
In controller
return redirect()->back()->with('status','Process is successfully done!');
Leave a Reply