Working on my first Laravel 5 project, I'm not sure where or how to translate the logic to force a redirect to the HTTPS protocol in my application. The key point here is that there are many domains pointing to my application and only two of three use SSL (the third resort to another domain, it's a long story). So, I would like to handle this situation in the application logic instead of editing the .htacces file.
In Laravel 4.2 I was able to complete the redirection with this code, added in the file filters.php
App::before(function($request)
{
if( ! Request::secure())
{
return Redirect::secure(Request::path());
}
});
I'm thinking that a Middleware class where I think something like the above should be implemented, but I can not figure out how.
This is a question originally posted by @NightMICU