Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试构建一个工匠命令,该命令将连接到远程 MSSQL 服务器,检索一些记录并将它们存储在本地 MySQL 数据库中。
我正在执行的查询是DB::connection('sqlsrv')->select('SELECT * FROM Users')
DB::connection('sqlsrv')->select('SELECT * FROM Users')
如果我在刀片视图中使用上述内容,它可以工作。但是如果我在工匠命令中使用它,我会得到错误[PDOException] could not find driver
[PDOException] could not find driver
任何帮助表示赞赏