數(shù)據(jù)庫使用Db查詢沒有問題
但是使用模型,會報數(shù)據(jù)庫連接錯誤
$goods = Good::where('id', $this->goods_id)->where('status', 1)->first();
PDOException: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) in /home/www/wwwroot/ln.zongcandaozhang.cn/suanming/vendor/illuminate/database/Connectors/Connector.php:70
Stack trace: