I'm working on a Laravel Project and try to integrate Laravel Scout. For testing with dusk I have created a .env.dusk.local environment file, that is used for testing. But when I try to run php artisan serve --env=dusk.local
it just runs the default .env file. Also all other .env files don't work.
Im using Laravel 8.15.0. I also try clearing the config cache but nothing changed.
I'm currently out of ideas, so hopefully someone can help me.
If you see laravel dusk documentation you can see that there is no need for you to so that your separate dusk env file replaces the original & once the test is done it restores it automatically.
If it still does not work
You can manually set the env thanks to
vlucas/phpdotenv
's methods 'load()',