0
我使用laravel 5.4创建的应用程序Laravel黄昏不工作
从我的默认.ENV文件设置:
APP_ENV=local
APP_KEY=base64:cMF768MPZ4ssHqG0InAUBnfvT4Ca0VaxsT6RwO3Geco=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost:8000
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=db_local
DB_USERNAME=root
DB_PASSWORD=123456
复制我的默认.ENV和重命名为.env.dusk后:
APP_ENV=local
APP_KEY=base64:cMF768MPZ4ssHqG0InAUBnfvT4Ca0VaxsT6RwO3Geco=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost:8000
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=db_testing
DB_USERNAME=root
DB_PASSWORD=123456
当我运行php artisan serve
,然后将其重命名我的默认.ENV文件.env.backup的php artisan dusk
和.env.dusk到.ENV
但我一直在我的默认数据库中运行迁移,而不是在我的测试数据库中运行。
可能重复之前运行
php artisan config:clear
(http://stackoverflow.com/questions/43049060/laravel-dusk-not-working-env-dusk-local ) – apokryfos你看https://github.com/laravel/dusk/issues/96 –