我正在尝试安装maatwebsite/excel;但是,我无法让它工作。
我尝试删除composer.lock文件并运行:
composer install
composer update
Run Code Online (Sandbox Code Playgroud)
我也试过:
composer require maatwebsite/excel --update-with-dependencies
Run Code Online (Sandbox Code Playgroud)
两种方法都不奏效。
我收到的错误是:
Problem 1
- maatwebsite/excel 3.1.10 requires phpoffice/phpspreadsheet ^1.6 -> satisfiable by phpoffice/phpspreadsheet[1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
- maatwebsite/excel 3.1.11 requires phpoffice/phpspreadsheet ^1.6 -> satisfiable by phpoffice/phpspreadsheet[1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
- maatwebsite/excel 3.1.12 requires phpoffice/phpspreadsheet ^1.6 -> satisfiable by phpoffice/phpspreadsheet[1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
- maatwebsite/excel 3.1.13 requires phpoffice/phpspreadsheet ^1.6 -> satisfiable by phpoffice/phpspreadsheet[1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0].
. …Run Code Online (Sandbox Code Playgroud) 我想与要用作参考的SQLserver与作为主要数据库的MYSQL分开连接,
为此,请设置
.env
#mysql
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=hogedb
DB_USERNAME=hoge
DB_PASSWORD=password
#SQLserver
DB_CONNECTION=sqlsrv
DB_HOST=localhost
DB_DATABASE=databasename
DB_USERNAME=username
DB_PASSWORD=password
Run Code Online (Sandbox Code Playgroud)
用户
protected $connection = 'sqlsrv';
Run Code Online (Sandbox Code Playgroud)
我得到了错误
找不到驱动程序(SQL:从[user]中选择*,其中[user]。[deleted_at]为null)