Ad

Laravel 5.2 /login & /register Not Working

- 1 answer

I'm testing out the new Laravel and when creating a basic application

composer create-project laravel/laravel
composer install
composer update
php artisan make:auth

I'm presented with the basic authentication scaffold, after doing a little playing around, the links on the menu for logging in and registers stop working. I coudn't find the problem to fix it so I just created a new project.

And the same has happened again.

All i've done is

  1. Created a new view members.dashboard
  2. Set the login redirect to go to the dash board after logging in

Has anyone seen this problem before and can point me to the error?

UPDATE

/auth/login = no route
/auth/register = no route
/login = redirect to home page
/register = redirect to home page
Ad

Answer

You were logged in & cookies were keeping track of your authentication status. Thus you are redirected to home page when you visit

/login
/register

In Laravel Auth, Logged-In users can't view login page or register page. You have to either logout OR delete the cookies (not a recommended way) to view these pages again.

Ad
source: stackoverflow.com
Ad