PHPackages                             benjaber-98/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. benjaber-98/laravel-https

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

benjaber-98/laravel-https
=========================

This is my package LaravelHttps

1.1.1(3y ago)4113MITPHPPHP ^7.3|^8.0

Since May 1Pushed 3y ago2 watchersCompare

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

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

Laravel HTTPS Checker
=====================

[](#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.

[![Latest Version on Packagist](https://camo.githubusercontent.com/7530d3ee632ba19befc5ecbee68a4b880d85c25bde92474639d42eddb296a7d1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f62656e6a616265722d39382f6c61726176656c2d68747470732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/benjaber-98/laravel-https)[![Total Downloads](https://camo.githubusercontent.com/aebb2d75ea473d48d62ff3e3102b844f5c85da8b2a49e8e63ba6960b76fae5f7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f62656e6a616265722d39382f6c61726176656c2d68747470732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/benjaber-98/laravel-https)

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

[](#installation)

You can install the package via composer:

```
composer require benjaber-98/laravel-https
```

You can publish the config file with:

```
php artisan vendor:publish
```

Then choose the number of package service provider from the list.

This is the contents of the published config file:

```
 env('FORCE_HTTPS_IN_LOCAL', false),
];
```

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:

```
FORCE_HTTPS_IN_LOCAL=true
```

### Usage

[](#usage)

##### Basic Usage:

[](#basic-usage)

- Add `\Benjaber98\LaravelHttps\Middlewares\ForceHttpMiddleware::class` to your Kernel file like this:

```
// app/Http/Kernel.php

...

//use it globally for all requests
protected $middleware = [
     ...
    \Benjaber98\LaravelHttps\Middlewares\ForceHttpMiddleware::class,
];

...

// Or use it globally for all web requests
protected $middlewareGroups = [
   'web' => [
       ...
       \Benjaber98\LaravelHttps\Middlewares\ForceHttpMiddleware::class,
   ],

...
//Or register it to use in routes
protected $routeMiddleware = [
   ...
   'force_https' => \Benjaber98\LaravelHttps\Middlewares\ForceHttpMiddleware::class,
];
```

###### Route Group Example:

[](#route-group-example)

```
    Route::group(['middleware' => ['force_https']], function () {
        Route::get('/', ['PageController', 'index']);
    });
```

###### Individual Route Examples:

[](#individual-route-examples)

```
    Route::get('/', ['PageController', 'welcome'])->middleware('force_https');
```

##### From Controller File:

[](#from-controller-file)

- You can include the `force_https` middleware in the constructor of your controller file.

###### Controller File Example:

[](#controller-file-example)

```
    public function __construct()
    {
       $this->middleware('force_https');
    }
```

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

[](#contributing)

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

Credits
-------

[](#credits)

- [Mahmoud Ben Jabir](https://github.com/Benjaber-98)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

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

Total

3

Last Release

1241d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/54c2aaaf8743d4d1a6bbe4cc4aaa72ba50e941c7523e2c1f243e3d9a35d55397?d=identicon)[Benjaber-98](/maintainers/Benjaber-98)

---

Top Contributors

[![Benjaber-98](https://avatars.githubusercontent.com/u/32901098?v=4)](https://github.com/Benjaber-98 "Benjaber-98 (5 commits)")

---

Tags

laravelLaravel HttpsBenjaber-98

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M46](/packages/spatie-laravel-pdf)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124603.0k](/packages/worksome-exchange)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[stephenjude/laravel-wallet

A simple wallet implementation for Laravel

26611.9k](/packages/stephenjude-laravel-wallet)[tarfin-labs/event-machine

Event-driven state machines for Laravel with event sourcing, type-safe context, and full audit trail.

199.4k](/packages/tarfin-labs-event-machine)

PHPackages © 2026

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