laravel reindirizza indietro
return Redirect::back()->withErrors(['msg', 'The Message']);
and inside your view call this
@if($errors->any())
<h4>{{$errors->first()}}</h4>
@endif
Redirect:: percorso (profilo) e con () in laravel
// For a route with the following URI: profile/{id}
return redirect()->route('profile', [$user]);
laravel torna indietro con successo
return redirect()->back()->with('message', 'IT WORKS!');
Displaying message if it exists:
@if(session()->has('message'))
<div class="alert alert-success">
{{ session()->get('message') }}
</div>
@endif
ritorno indietro in lama laravel
{{ url()->previous() }}
return redirect con messaggio laravel
Route::post('user/profile', function () {
// Update the user's profile...
return redirect('dashboard')->with('status', 'Profile updated!');
});