dimanche 21 août 2016

Laravel login not working properly

I tried to create a basic login, but somehow it did not work correctly.

My Form looks like this:

            <form role="form" method="POST" action="/auth/login" class="form col-md-12 center-block">
                {!! csrf_field() !!}

                <div class="form-group">
                    <input type="email" class="form-control input-lg" name="email" value="" placeholder="Email">
                </div>

                <div class="form-group">
                    <input type="password" class="form-control input-lg" name="password" placeholder="Passwort">
                </div>

                    <div class="form-group">
                        <button type="submit" class="btn btn-primary btn-lg btn-block">Login</button>
                    </div>
            </form>

My Login routes look like this:

# Login, Logout
Route::get('auth/login', ['as' => 'newSession', 'uses' => 'Auth\AuthController@getLogin']);
Route::post('auth/login', ['as' => 'createSession', 'uses' => 'Auth\AuthController@postLogin']);
Route::get('auth/logout', ['as' => 'destroySession', 'uses' => 'Auth\AuthController@getLogout']);

My login form shows correctly at this url :

http://localhost/myApp/public/

When I press login I get an error:

Object not found 404

Url looks like this then

http://localhost/auth/login

I want to redirect the user to product/home (folder product inside the product folder home.blade.php), after the user is logged in.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire