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

ActiveLibrary[Security](/categories/security)

toyi/force-https
================

Force Https middleware for Laravel apps

1.1.0(5y ago)01.2kMITPHPPHP &gt;=7.2CI failing

Since Aug 27Pushed 5y ago1 watchersCompare

[ Source](https://github.com/toyi/force-https)[ Packagist](https://packagist.org/packages/toyi/force-https)[ RSS](/packages/toyi-force-https/feed)WikiDiscussions master Synced 6d ago

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

Force Https
===========

[](#force-https)

[![Packagist](https://camo.githubusercontent.com/1af4c2874b63c2f5bb2a6b067d52d22e2219ccd646b0879b13b0e17315dca841/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f79692f666f7263652d68747470732e737667)](https://packagist.org/packages/toyi/force-https)

Provide a simple and convenient way to force Https.

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

[](#installation)

Install via composer

```
composer require toyi/force-https
```

### Register Service Provider

[](#register-service-provider)

**Note! This and next step are optional if you use laravel&gt;=5.5 with package auto discovery feature.**

Add service provider to `config/app.php` in `providers` section

```
Toyi\ForceHttps\ServiceProvider::class,
```

### Publish Configuration File

[](#publish-configuration-file)

```
php artisan vendor:publish --provider="Toyi\ForceHttps\ServiceProvider" --tag="config"
```

Usage
-----

[](#usage)

Add the `Toyi\ForceHttps\ForceHttps::class` middleware in the web middleware group. The `FORCE_HTTPS` boolean env variable can be used to activate or deactivate redirections.

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [](https://github.com/toyi/force-https)
- [All contributors](https://github.com/toyi/force-https/graphs/contributors)

This package is bootstrapped with the help of [melihovv/laravel-package-generator](https://github.com/melihovv/laravel-package-generator).

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 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 ~114 days

Total

5

Last Release

2000d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/effb82366bd2fe4e6696f77c6f4d2310ff7cced813d5228406da594752ed6d07?d=identicon)[toyi](/maintainers/toyi)

---

Top Contributors

[![toyi](https://avatars.githubusercontent.com/u/15825155?v=4)](https://github.com/toyi "toyi (6 commits)")

---

Tags

httpslaravelforce

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[tzsk/otp

A secure, database-free One-Time Password (OTP) generator and verifier for PHP and Laravel.

241641.4k1](/packages/tzsk-otp)[dgtlss/warden

A Laravel package that proactively monitors your dependencies for security vulnerabilities by running automated composer audits and sending notifications via webhooks and email

8745.6k](/packages/dgtlss-warden)[ercsctt/laravel-file-encryption

Secure file encryption and decryption for Laravel applications

642.6k](/packages/ercsctt-laravel-file-encryption)[laragear/poke

Keep your forms alive, avoid TokenMismatchException by gently poking your Laravel app

2211.5k](/packages/laragear-poke)[owenmelbz/https-enforcement

Laravel 5.x middleware to enforce https redirection for your app.

252.6k](/packages/owenmelbz-https-enforcement)

PHPackages © 2026

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