bdares
0
Q:

return redirect with message laravel

return Redirect::back()->withErrors(['msg', 'The Message']);

and inside your view call this

@if($errors->any())
<h4>{{$errors->first()}}</h4>
@endif
1
// For a route with the following URI: profile/{id}

return redirect()->route('profile', [$user]);
1
Route::post('user/profile', function () {
    // Update the user's profile...

    return redirect('dashboard')->with('status', 'Profile updated!');
});
0
// For a route with the following URI: profile/{id}

return redirect()->route('profile', ['id' => 1]);
0

New to Communities?

Join the community