If you are using Laravel Dusk to test an external website and if the website is secured with basic HTTP Authentication (which is usually the case with staging and dev sites) you can use this trick.
Append the username and password just before the url
So in dusk you can visit the URL by
Or you can set the APP_URL in the .env file directly.
APP_ENV = http://UserName:Password@www.example.com