Download the PHP package jeremykenedy/laravel-https without Composer
On this page you can find all versions of the php package jeremykenedy/laravel-https. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jeremykenedy/laravel-https
More information about jeremykenedy/laravel-https
Files in jeremykenedy/laravel-https
Package laravel-https
Short Description Laravel Https is middleware to check for Secure HTTP requests. Laravel Https middleware providers can check and redirect if the user is not hitting the https url of your app/site or the request can be automatically redirected to a Secure Http (HTTPS) request.
License MIT
Informations about the package laravel-https
Laravel HTTPS Web and API Checker
Laravel Https is middleware to check for Secure HTTP requests. Laravel Https has can check for HTTPS and throw an error or automatically redirect to HTTPS.
- About
- Features
- Requirements
- Installation Instructions
- Configuration
- Environment File
- Usage
- From Route File
- Route Group Example
- Individual Route Examples
- From Controller File
- Controller File Example
- From Route File
- Screenshots
- File Tree
- Opening an Issue
- License
Features
laravel-https Features |
---|
forceHTTPS middlware to check if URL is HTTPS and redirect to HTTPS if not. |
checkHTTPS middlware to check if URL is HTTPS and throw an error if not. |
Each middleware can be used in individual controllers constructor |
Each middleware can be used as a middleware on individual routes |
Each middleware can be used as a middleware route group |
Returns HTML for HTTP requests |
Returns JSON for API requests |
Uses localized language files |
Requirements
Installation Instructions
-
From your projects root folder in terminal run:
-
Register the package
-
Laravel 5.5 and up Uses package auto discovery feature, no need to edit the
config/app.php
file. - Laravel 5.4 and below
Register the package with laravel in
config/app.php
underproviders
with the following:
-
-
Optionally publish the packages views, config file, and language files by running the following from your projects root folder:
- Add the middleware to your routes or controller. See Usage.
Configuration
laravel-https can be configured in directly in /config/laravel-https.php
if you published the assets.
Or you can variables to your .env
file.
Environment File
Here are the .env
file variables available:
Usage
From Route File:
- You can include the
checkHTTPS
orforceHTTPS
in a route groups or on individual routes.
Route Group Example:
Individual Route Examples:
From Controller File:
- You can include the
checkHTTPS
orforceHTTPS
in the contructor of your controller file.
Controller File Example:
Screenshots
File Tree
- Tree command can be installed using brew:
brew install tree
- File tree generated using command
tree -a -I '.git|node_modules|vendor|storage|tests'
Opening an Issue
Before opening an issue there are a couple of considerations:
- You are all awesome!
- Read the instructions and make sure all steps were followed correctly.
- Check that the issue is not specific to your development environment setup.
- Provide duplication steps.
- Attempt to look into the issue, and if you have a solution, make a pull request.
- Show that you have made an attempt to look into the issue.
- Check to see if the issue you are reporting is a duplicate of a previous reported issue.
- Following these instructions show me that you have tried.
- If you have a questions send me an email to [email protected]
- Need some help, I can do my best on Slack: https://opensourcehelpgroup.slack.com
- Please be considerate that this is an open source project that I provide to the community for FREE when openeing an issue.
Open source projects are a the community’s responsibility to use, contribute, and debug.
License
Laravel-https is licensed under the MIT license. Enjoy!