我使用laravel 5.4
创建了一个应用程序默认.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
然后php artisan dusk
时,它会将我的默认.env文件重命名为.env.backup和.env.dusk为.env
但我继续在我的默认数据库中运行迁移,而不是在我的测试数据库中运行。
答案 0 :(得分:0)
我认为您的配置可能已被缓存。在运行php artisan config:clear
php artisan dusk