https://github.com/morning-train/laravel-https
https://github.com/morning-train/laravel-https
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/morning-train/laravel-https
- Owner: Morning-Train
- License: gpl-3.0
- Created: 2017-01-02T07:55:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-05-08T05:08:32.000Z (about 3 years ago)
- Last Synced: 2025-02-08T08:37:18.404Z (over 1 year ago)
- Language: PHP
- Size: 21.5 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Helper for SSL & HTTPS
## Install
Via Composer
``` bash
$ composer require morningtrain/laravel-https
```
## Usage
Deploy the config files.
``` bash
$ 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:
``` php
class Kernel extends HttpKernel
{
/**
* The application's middleware stack.
*
* @var array
*/
protected $middleware = [
\MorningTrain\Laravel\Https\Http\Middleware\ForceSSL::class,
];
}
```
## Credits
- [Morning Train](https://morningtrain.dk/)