First, change the URL of your application in the config / app.php file (or in the APP_URL value of your .env file):
'url' => 'http://www.example.com',
Then make the URL generator use it. Add these lines of code to the app / Providers / AppServiceProvider.php file in the download method:
\URL::forceRootUrl(\Config::get('app.url')); // And this if you wanna handle https URL scheme // It not usefull for http://www.example.com, it just to make it more independant from the constant value if (\Str::contains(\Config::get('app.url'), 'https://')) { \URL::forceScheme('https'); //use \URL:forceSchema('https') if you use laravel < 5.4 }
These are all people.
source share