PHPackages                             c6digital/laravel-force-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. c6digital/laravel-force-https

ActiveLibrary[Security](/categories/security)

c6digital/laravel-force-https
=============================

Easily force HTTPS for all routes and URLs.

v2.0.0(7mo ago)11.1k↓50%[2 PRs](https://github.com/c6digital/laravel-force-https/pulls)MITPHPPHP ^8.2CI passing

Since Feb 29Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/c6digital/laravel-force-https)[ Packagist](https://packagist.org/packages/c6digital/laravel-force-https)[ Docs](https://github.com/c6digital/laravel-force-https)[ GitHub Sponsors]()[ RSS](/packages/c6digital-laravel-force-https/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (13)Versions (6)Used By (0)

Easily force HTTPS for all routes and URLs.
===========================================

[](#easily-force-https-for-all-routes-and-urls)

[![Latest Version on Packagist](https://camo.githubusercontent.com/56c737659ecab39b3a30cad9f7e6ef2c28b315cc4f73a38420790b45d3002da2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63366469676974616c2f6c61726176656c2d666f7263652d68747470732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/c6digital/laravel-force-https)[![GitHub Tests Action Status](https://camo.githubusercontent.com/90db5bdd2311b60a0934d426a1faf1304113809f7097ca67150893a99365b3ef/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f63366469676974616c2f6c61726176656c2d666f7263652d68747470732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/c6digital/laravel-force-https/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/77312cad29876c85eb1d59f6fbe9a19ced551cd05d20d26a67aa9b2c01255f57/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f63366469676974616c2f6c61726176656c2d666f7263652d68747470732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/c6digital/laravel-force-https/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/776fb825872f85b2c17633a2be805af913108b9f81ddae80e283b5d58bba2c46/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63366469676974616c2f6c61726176656c2d666f7263652d68747470732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/c6digital/laravel-force-https)

This package registers a small piece of middleware that will force HTTPS access for all routes, as well as force HTTPS for generate URLs, e.g. `route()` and `url()` calls.

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

[](#installation)

You can install the package via Composer:

```
composer require c6digital/laravel-force-https
```

Usage
-----

[](#usage)

The `ForceHttps` middleware is automatically registered with your application. All you need to do is use the `FORCE_HTTPS` environment variable to toggle the behaviour.

```
FORCE_HTTPS=true
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Ryan Chandler](https://github.com/c6digital)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance65

Regular maintenance activity

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 58.8% 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 ~298 days

Total

3

Last Release

214d ago

Major Versions

v1.1.0 → v2.0.02025-10-16

PHP version history (2 changes)v1.0.0PHP ^8.1

v2.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/568d485d441c691b0358b9091254a6a671fef8f76b73f28af1180ad568d142b2?d=identicon)[ryangjchandler](/maintainers/ryangjchandler)

---

Top Contributors

[![ryangjchandler](https://avatars.githubusercontent.com/u/41837763?v=4)](https://github.com/ryangjchandler "ryangjchandler (10 commits)")[![c6andy](https://avatars.githubusercontent.com/u/213634680?v=4)](https://github.com/c6andy "c6andy (5 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravelC6 Digitallaravel-force-https

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-ciphersweet

Use ciphersweet in your Laravel project

416718.4k1](/packages/spatie-laravel-ciphersweet)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)

PHPackages © 2026

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