SQLSTATE[42S02]: Base table or view not found: 1146 Table '表' doesn't exist (SQL: select count(*) as aggregate from `表` where `username` = 123)


SQLSTATE[42S02]: Base table or view not found: 1146 Table '表' doesn't exist (SQL: select count(*) as aggregate from `表` where `username` = 123)

 

错误解释:报错的意思是,你的项目里  没有  那个表,    我报这个错误是因为,我用了验证,代码如下

$formData = $this->validate($request, [ 'username' => 'required|unique:表名称,username',//unique 即 唯一验证,表名称 即 验证的表 ,username 即需要进行唯一验证的字段
            'password' => 'required' ]);

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM