Laravel dusk not working .env.dusk.local

佐手、 提交于 2019-12-05 01:33:24

Instead of .env.dusk.local try .env.dusk

Also instead of using your mysql database I would recommend using a temporary sqlite db since it gets created and destroyed during tests.

you will have to have a sqilte config in your database.php that points at an actual .sqlite file that you have in your installation

so copy the sqlite config in database.php and then paste it, name it sqlite_dusk maybe, then for the location of the db put it as storage_path('dusk.sqlite') or something like that. Then create a blank dusk.sqlite file in the root of your storage folder.

Then in your .env.dusk set:

DB_CONNECTION=sqlite_dusk

Hope that helps!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!