Download the PHP package benjaber-98/laravel-https without Composer
On this page you can find all versions of the php package benjaber-98/laravel-https. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download benjaber-98/laravel-https
More information about benjaber-98/laravel-https
Files in benjaber-98/laravel-https
Package laravel-https
Short Description This is my package LaravelHttps
License MIT
Homepage https://github.com/Benjaber-98/laravel-https
Informations about the package laravel-https
Laravel HTTPS Checker
Laravel Https is package is created to check for Secure HTTP requests. Laravel Https provides a middleware to force redirection to HTTPS Protocol.
Installation
You can install the package via composer:
You can publish the config file with:
Then choose the number of package service provider from the list.
This is the contents of the published config file:
By default package is disabled in local environment, if you want to turn it on you can set FORCE_HTTPS_IN_LOCAL
in .env
file like this:
Usage
Basic Usage:
- Add
\Benjaber98\LaravelHttps\Middlewares\ForceHttpMiddleware::class
to your Kernel file like this:
Route Group Example:
Individual Route Examples:
From Controller File:
- You can include the
force_https
middleware in the constructor of your controller file.
Controller File Example:
Contributing
Please see CONTRIBUTING for details.
Credits
- Mahmoud Ben Jabir
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-https with dependencies
spatie/laravel-package-tools Version ^1.4.3
illuminate/contracts Version *