Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ynoth25's avatar

Laravel Deployment in HTTPS

How to deploy laravel project in https? I tried everything in the tutorial but does not work. Can you give me a hint on how to?

0 likes
7 replies
alexanderjoe's avatar

In your env file for deployment APP_ENV set to production?

chiefguru's avatar

@ynoth25 You might also need to add this:

    if (config('app.env') === 'production') {
        URL::forceScheme('https');
    }

to the boot() method of the AppServiceProvider.

We had to add it to get https assets in 5.8, don't know if it is relevant now with 8.x.

siangboon's avatar

first of all, you have to make sure you install a proper SSL certificate in the hosting server and able to be browse from https://

what "everything" had you tried???

Please or to participate in this conversation.