Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

wturrell's avatar

Laravel Dusk and Valet - wrongly accessing localhost

Is the Chrome Driver actually compatible with Valet?

PHP 8.2.12 (macOS Ventura 13.6 with Homebrew) Laravel Valet 4.5.0 Laravel site running 10.34.2 served at https:://mysite.test and APP_URL set to the same in .env

When running dusk (with --browser to see what it's doing) it insists on visiting localhost rather than mysite.test, despite also setting APP_URL to https://localhost/mysite as some have suggested.

(Thanks.)

0 likes
1 reply
wturrell's avatar
wturrell
OP
Best Answer
Level 3

Just needed to do this in config/app…

-    'url' => 'http://localhost',
+    'url' => env('APP_URL', 'http://localhost'),

Please or to participate in this conversation.