Laravel 5 – redirect to HTTPS
You can make it works with a Middleware class. Let me give you an idea. namespace MyApp\Http\Middleware; use Closure; use Illuminate\Support\Facades\App; class HttpsProtocol { public function handle($request, Closure $next) { if (!$request->secure() && App::environment() === ‘production’) { return redirect()->secure($request->getRequestUri()); } return $next($request); } } Then, apply this middleware to every request adding setting the rule … Read more