Are you by chance using config caching (recommended on production)? Did you try php artisan config:clear? If they're cached, you'd have to run that anytime you change something in .env or config files.
Apr 19, 2018
6
Level 1
Domain is used instead of APP_URL
I have tried to change app_url in ENV file but it is being ignored. Instead Laravel uses whatever I config Apache to set as base domain (for example localhost:8887). As soon as I changed Apache config Laravel composes every single URL with Apache base domain (pointing to public folder).
In RouteServiceProvider I added
public function boot() {
parent::boot();
$url = $this->app['url'];
$url->forceRootUrl(config('app.url'));
}
to finally make it work the way I want. But of course I don't want to leave it without understanding what is really happening. What am I missing? Thank you.
Please or to participate in this conversation.