PHPackages                             padosoft/laravel-https - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. padosoft/laravel-https

ActiveLibrary[Security](/categories/security)

padosoft/laravel-https
======================

Force redirect to https for Laravel.

1.1.0(7y ago)545[1 PRs](https://github.com/padosoft/laravel-https/pulls)MITPHPPHP &gt;=5.6.0

Since May 9Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/padosoft/laravel-https)[ Packagist](https://packagist.org/packages/padosoft/laravel-https)[ Docs](https://github.com/padosoft/laravel-https)[ RSS](/packages/padosoft-laravel-https/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (5)Dependencies (6)Versions (7)Used By (0)

Laravel Package to force https redirect.
========================================

[](#laravel-package-to-force-https-redirect)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1e229c7c9f5ce5c92f4cc68311f1742420b2ecfeaae56c7bf99ceb2810d6186b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7061646f736f66742f6c61726176656c2d68747470732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/padosoft/laravel-https)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Quality Score](https://camo.githubusercontent.com/8211ae9b67e69eba24cde49ee90fcd5f92a228a6c4c136f19fd905033de1cfe6/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7061646f736f66742f6c61726176656c2d68747470732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/padosoft/laravel-https)[![Build Status](https://camo.githubusercontent.com/29c7376e29f9af179f10dfcc6a0ed3fed00141519a4b7d711404d4177bc41975/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7061646f736f66742f6c61726176656c2d68747470732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/padosoft/laravel-https)[![Total Downloads](https://camo.githubusercontent.com/b3a4b05ef063ee93e88974030728f3976b0ddf4cdc2a4ea6559021205fa204ff/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7061646f736f66742f6c61726176656c2d68747470732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/padosoft/laravel-https)

This package provides a laravel middleware to force https redirect.

Table of Contents
=================

[](#table-of-contents)

- [Laravel Package to force https redirect.](#laravel-package-to-force-https-redirect)
    - [Requires](#requires)
    - [Installation](#installation)
    - [USAGE](#usage)
    - [Change log](#change-log)
    - [Testing](#testing)
    - [Contributing](#contributing)
    - [Security](#security)
    - [Credits](#credits)
    - [About Padosoft](#about-padosoft)
    - [License](#license)

\##Requires

- "php" : "&gt;=5.6.0",
- laravel/framework": "~5.2"

Installation
------------

[](#installation)

You can install the package via composer:

```
$ composer require padosoft/laravel-https
```

### FOR LARAVEL 5.6+

[](#for-laravel-56)

No additional steps required because the service provider use new L5.5+ autodiscovery feature.

### FOR LARAVEL &lt;=5.5

[](#for-laravel-55)

You must install this service provider.

```
// config/app.php
'provider' => [
    ...
    Padosoft\Laravel\Https\LaravelHttpsServiceProvider::class,
    ...
];
```

### publish config (optional)

[](#publish-config-optional)

Optionally publish the packages config file by running the following from your projects root folder:

```
    php artisan vendor:publish --tag=laravel-https
```

### register the middleware

[](#register-the-middleware)

Add the middleware to your routes or controller. See Usage.

USAGE
-----

[](#usage)

### From Route File:

[](#from-route-file)

You can include the HttpsForce in a route groups or on individual routes.

### Route Group Example:

[](#route-group-example)

```
    Route::group(['middleware' => ['web', 'HttpsForce']], function () {
        Route::get('/', 'WelcomeController@welcome');
    });
```

### Individual Route Examples:

[](#individual-route-examples)

```
    Route::get('/', 'WelcomeController@welcome')->middleware('HttpsForce');
    Route::match(['post'], '/test', 'Testing\TestingController@runTest')->middleware('HttpsForce');
```

### From Controller File:

[](#from-controller-file)

You can include the HttpsForce in the constructor of your controller file.

### Controller File Example:

[](#controller-file-example)

```
    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
       $this->middleware('HttpsForce');
    }
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email instead of using the issue tracker.

Credits
-------

[](#credits)

- [Lorenzo Padovani](https://github.com/lopadova)
- [All Contributors](../../contributors)

About Padosoft
--------------

[](#about-padosoft)

Padosoft () is a software house based in Florence, Italy. Specialized in E-commerce and web sites.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance41

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~25 days

Total

5

Last Release

2827d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9fabb1f16f7a29a235494893175d25d51628fe2a6c9052834e35abe0666c9a8e?d=identicon)[lopadova](/maintainers/lopadova)

---

Top Contributors

[![lopadova](https://avatars.githubusercontent.com/u/10467699?v=4)](https://github.com/lopadova "lopadova (8 commits)")

---

Tags

httpslaravellaravel-packageredirectsslhttpssslredirectseoLaravel Httpspadosoft

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/padosoft-laravel-https/health.svg)

```
[![Health](https://phpackages.com/badges/padosoft-laravel-https/health.svg)](https://phpackages.com/packages/padosoft-laravel-https)
```

###  Alternatives

[kelunik/acme

ACME library written in PHP.

121603.9k3](/packages/kelunik-acme)[paragonie/certainty

Up-to-date, verifiable repository for Certificate Authorities

2642.4M20](/packages/paragonie-certainty)[acmephp/core

Raw implementation of the ACME protocol in PHP

38973.7k7](/packages/acmephp-core)[spatie/ssl-certificate-chain-resolver

SSL certificate chain resolver

3069.6k](/packages/spatie-ssl-certificate-chain-resolver)[kelunik/acme-client

Let's Encrypt / ACME client written in PHP for the CLI.

3933.9k1](/packages/kelunik-acme-client)[acmephp/ssl

PHP wrapper around OpenSSL extension providing SSL encoding, decoding, parsing and signing features

141.2M4](/packages/acmephp-ssl)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
