Morning-Train / laravel-https by morningtrain

Provides some initial https setup
2,672
2
4
Package Data
Maintainer Username: morningtrain
Maintainer Contact: mail@morningtrain.dk (Morningtrain)
Package Create Date: 2017-01-02
Package Last Update: 2023-05-08
Language: PHP
License: GPL-3.0-only
Last Refreshed: 2024-05-04 15:06:43
Package Statistics
Total Downloads: 2,672
Monthly Downloads: 71
Daily Downloads: 0
Total Stars: 2
Total Watchers: 4
Total Forks: 0
Total Open Issues: 0

Helper for SSL & HTTPS

Install

Via Composer

$ composer require morningtrain/laravel-https

Usage

Deploy the config files.

$ php artisan vendor:publish

Update the following in your .env:

USE_SSL=true
REDIRECT_TO_HTTPS=true

Register the ForceSSL middleware as a global middleware in your App\Httk\Kernel class:

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

Credits