Jaydeep Mor
Jaydeep Mor

Reputation: 1703

Laravel redirect to [https] not [http]

Please help me out for below question.

I am using laravel version 5.

1) In pagination,

{!! $list->appends($form)->links() !!}

2) In redirect action,

return redirect()->action('toute@method', [$testId]);

Both redirect to me [https] not [http].

Thank you !

Upvotes: 0

Views: 462

Answers (2)

Jaydeep Mor
Jaydeep Mor

Reputation: 1703

Solve by adding below line in Middleware.

$request->server->set('HTTPS', 'off');

Upvotes: 0

Miggy
Miggy

Reputation: 816

I think this code is worth a try.

In your AppServiceProvider.php you could add this:

\URL::forceSchema('http');

Hope it helps.

Upvotes: 1

Related Questions