kiwo123
599
8
Laravel

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')) {
            \URL::forceSchema('https');
        }
    }

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

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

Reply to

Use Markdown with GitHub-flavored code blocks.