Laravel pagination returns links in http and not https

Posted 2 years ago by kiwo123

I am using the ->paginate(20); function on my query but the only problem is that it will return http and not https

Eg: "next_page_url":"http://www.mysite"

I have tried to force my app to use https by adding this in AppServiceProvider

public function boot()
        if (!\App::environment('local')) {

So have can I force Laravel to return all links in https?

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.