PHP code example of morningtrain / laravel-https

1. Go to this page and download the library: Download morningtrain/laravel-https library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

morningtrain / laravel-https example snippets

 bash
$ php artisan vendor:publish

USE_SSL=true
REDIRECT_TO_HTTPS=true
 php
class Kernel extends HttpKernel
{
    /**
     * The application's middleware stack.
     *
     * @var array
     */
    protected $middleware = [
        \MorningTrain\Laravel\Https\Http\Middleware\ForceSSL::class,
    ];
}