Answers for "change auth redirect laravel"

C#
3

redirect to route laravel

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

    return redirect('/dashboard')->with('status', 'Profile updated!');
});
Posted by: Guest on December-10-2020
0

redirect after login laravel

class RegisterController extends Controller
{
    protected $redirectTo = '/home';

    protected function redirectTo()
    {
        if (auth()->user()->role_id == 1) {
            return '/admin';
        }
        return '/home';
    }

}
Posted by: Guest on July-30-2020

C# Answers by Framework

Browse Popular Code Answers by Language