Hello Devs,

In this tutorial, we are going to learn how to force redirect http to https in laravel application.

Follow this step by step guide given below:

Create Middleware

php artisan make:middleware redirectSecureHttp


public function handle($request, Closure $next){
  if (!$request->secure()) {
      return redirect()->secure($request->path());
  return $next($request);


protected $middleware = [

I hope this example helps you.