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