Support the ongoing development of Laravel.io →
Laravel Views Mail

i have {{ route('view/issue', $issue->id) }} in an email view. This generates "http://localhost/issues/625/view-issue" instead of "https://superdomain.com/issues/625/view-issue". Routes in the rest of the application work fine.

I have 'url' => env('APP_URL', 'https://superdomain.com'), in my config/app.php and i even set URL::forceRootUrl('https://superdomain.com'); in my AppServiceProvider.php to try and force it to work.

i can dump config('app.url') or env('APP_URL') and they both give me "https://superdomain.com" but the urls in the email still use http://localhost. I also have my .env set with "APP_URL=https://superdomain.com" and there are no other .env files in the root dir.

Anything else i need to check?

Thanks in advance!

I'm using laravel 6.18.3 and php 7.3.11

Last updated 3 years ago.
0

i updated to Laravel Framework 6.18.6. no change.

0

Sign in to participate in this thread!

PHPverse

Your banner here too?

ITwrx itwrx Joined 24 Jan 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.