Laravel auth-邮政方法 /登录无需做任何事情



我正在尝试使用Laravel的身份验证。我更改了user.php:

class User extends Authenticatable
{
    use Notifiable;
    protected $connection = 'db';
    protected $table = 'db.member';
    protected $fillable = [
        'nom', 'email', 'pwd',
    ];
    protected $hidden = [
        'pwd', 'remember_token',
    ];
    protected $casts = [
        'email_verified_at' => 'datetime',
    ];
}

似乎正在重定向http://127.0.0.1/login,所以什么也没发生。

http://127.0.0.1/login: get 有效,但 post 不,因此我收到消息"这些凭据不符合我们的记录。"我尝试在web.php

中更改
Auth::routes();
Route::auth();

但是什么都没有发生,所以我需要添加route :: post('register','registerController@create'(;我自己。

我想知道设置控制器方法的位置?

我使用Laravel 5.8,因此Authcontroller已被LoginController和register Controller取代(我想知道寄存器是否仍然是正确的方法(

感谢您的帮助!

在您的终端或cmd中,获取您的项目root并输入以下命令:

php artisan make:auth

之后尝试访问您的http://127.0.0.1/register

最新更新