return redirect with message laravel

46

return redirect with message laravel -

Route::post('user/profile', function () {
    // Update the user's profile...

    return redirect('dashboard')->with('status', 'Profile updated!');
});

laravel redirect back with errors and input -

return redirect()->back()->withInput();

Redirect::route('profile') and with() in laravel -

// For a route with the following URI: profile/{id}

return redirect()->route('profile', [$user]);

Redirect::route('profile') and with() in laravel -

// For a route with the following URI: profile/{id}

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

Comments

Submit
0 Comments