Question Details

No question body available.

Tags

php laravel laravel-sail

Answers (1)

Accepted Answer Available
Accepted Answer
June 18, 2026 Score: 9 Rep: 286 Quality: Expert Completeness: 60%

The errors are actually coming from the shell, not Laravel.

The issue is in your .env file. You have spaces around the = sign, like this:

SERVICEUSERNAME = "user" SERVICEPASSWORD = "password" SERVICESITE = "sandbox.example.org"

Laravel’s dotenv parser might still be okay with it, but sail also loads .env through a shell context. In shell syntax, this is not valid, so it ends up being read like SERVICEUSERNAME is a command. That’s why the error looks kind of weird.

So, basically, just remove the spaces:

SERVICEUSERNAME=user SERVICEPASSWORD=password SERVICESITE=sandbox.example.org

Using quotes is still fine, as long as there are no spaces around =:

SERVICE
USERNAME="user" SERVICEPASSWORD="password" SERVICESITE="sandbox.example.org"

After that, run:

sail artisan config:clear

And if the Sail/container environment still feels like it’s caching the old values, restart it:

sail down sail up -d

Also, small note: this PHP string looks a bit sus:

"baseuri" => "https://{config('services.service.subdomain')}/api",

Better use this:

'base
uri' => 'https://' . config('services.service.subdomain') . '/api',

Or this one:

'base_uri' => sprintf( 'https://%s/api', config('services.service.subdomain') ),