Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/254.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Laravel身份验证更改表名_Php_Database_Laravel_Authentication_Model - Fatal编程技术网

Php Laravel身份验证更改表名

Php Laravel身份验证更改表名,php,database,laravel,authentication,model,Php,Database,Laravel,Authentication,Model,因此,我使用 php artisan make:auth 但是我想将数据库中的表名改为accounts而不是users。我已经在migrations,user model和config/auth.php中对其进行了更改,但当我尝试注册/登录时,它仍然在数据库中查找“users”表。我一直在寻找解决方案,但这就是所有人的建议。(顺便说一句,我已经有一个名为“users”的表,其中包含其他数据) 还有什么我需要更改的吗?似乎是验证试图检查电子邮件是否存在于用户表中 将验证更改为: 'email'

因此,我使用

php artisan make:auth
但是我想将数据库中的表名改为accounts而不是users。我已经在migrations,user model和config/auth.php中对其进行了更改,但当我尝试注册/登录时,它仍然在数据库中查找“users”表。我一直在寻找解决方案,但这就是所有人的建议。(顺便说一句,我已经有一个名为“users”的表,其中包含其他数据)


还有什么我需要更改的吗?

似乎是验证试图检查电子邮件是否存在于用户表中

将验证更改为:

'email' => 'required|email|unique:accounts'

似乎验证正在尝试检查users表中是否存在该电子邮件

将验证更改为:

'email' => 'required|email|unique:accounts'

您是否有任何异常或错误输出要显示?异常跟踪会很有帮助。下面是我尝试注册时的输出,例如:向我们展示在auth.phpDo中您更改了什么您有任何异常或错误输出要显示吗?异常跟踪会很有帮助。下面是我尝试注册时的输出,例如:告诉我们在auth.php中更改了什么