H
H
HeartOfProgrammer2016-03-31 19:17:58
Laravel
HeartOfProgrammer, 2016-03-31 19:17:58

Why can't I access the login page in laravel 5.1?

I am using laravel 5.1. The problem is that I write localhost:8000/auth/login and immediately throws me at this link localhost:8000/home?
Routers are correctly spelled out:

Route::get('auth/login', 'Auth\[email protected]');
Route::post('auth/login', 'Auth\[email protected]');
Route::get('auth/logout', 'Auth\[email protected]');

AuthController is written like this:
public function __construct()
    {
        $this->middleware('guest', ['except' => 'getLogout']);
    }

    /**
     * Get a validator for an incoming registration request.
     *
     * @param  array  $data
     * @return \Illuminate\Contracts\Validation\Validator
     */
    protected function validator(array $data)
    {
        return Validator::make($data, [
            'name' => 'required|max:255',
            'email' => 'required|email|max:255|unique:users',
            'password' => 'required|confirmed|min:6',
        ]);
    }

    /**
     * Create a new user instance after a valid registration.
     *
     * @param  array  $data
     * @return User
     */
    protected function create(array $data)
    {
        return User::create([
            'name' => $data['name'],
            'email' => $data['email'],
            'password' => bcrypt($data['password']),
        ]);
    }
}

What is the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arman, 2016-03-31
@HeartOfProgrammer

that is already authorized. delete cookies, log in incognito or another browser

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question