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

ActiveLibrary[Security](/categories/security)

novay/laravel-https
===================

Laravel Https is middleware to force us to access Secure HTTP requests.

v1.0.0(8y ago)235MITPHPPHP &gt;=5.4.0

Since Jan 28Pushed 8y ago1 watchersCompare

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

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Laravel Force HTTPS
===================

[](#laravel-force-https)

[![Latest Stable Version](https://camo.githubusercontent.com/2ad106a1c587002f4643c4bf4c445cd242b024129fc5644a5788b4258a07babf/68747470733a2f2f706f7365722e707567782e6f72672f6e6f7661792f6c61726176656c2d68747470732f762f737461626c65)](https://packagist.org/packages/novay/laravel-https)[![Total Downloads](https://camo.githubusercontent.com/2a2b8c398c531afd5940f32b1c094fa4e29beddbc696779132258baa6294790f/68747470733a2f2f706f7365722e707567782e6f72672f6e6f7661792f6c61726176656c2d68747470732f646f776e6c6f616473)](https://packagist.org/packages/novay/laravel-https)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)

- [About](#about)
- [Requirements](#requirements)
- [Installation Instructions](#installation-instructions)
- [Configuration](#configuration)
- [Usage](#usage)
    - [From Route File](#from-route-file)
        - [Route Group Example](#route-group-example)
        - [Individual Route Examples](#individual-route-examples)
    - [From Controller File](#from-controller-file)
        - [Controller File Example](#controller-file-example)
- [License](#license)

### About

[](#about)

Laravel Https is middleware to force us into Secure HTTP requests.

### Requirements

[](#requirements)

- [Laravel 5.1, 5.2, 5.3, 5.4, or 5.5+](https://laravel.com/docs/installation)

### Installation Instructions

[](#installation-instructions)

1. From your projects root folder in terminal run:

    ```
        composer require novay/laravel-https
    ```
2. 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` under `providers` with the following:

    ```
        'providers' => [
        ...
            Novay\ForceHttps\ForceHttpsServiceProvider::class,
        ];
    ```
3. Optionally publish the packages views, config file, and language files by running the following from your projects root folder:

    ```
        php artisan vendor:publish --tag=laravel-https
    ```
4. Add the middleware to your routes or controller. See [Usage](#usage).

### Configuration

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

### Usage

[](#usage)

##### From Route File:

[](#from-route-file)

- You can include the `https` in a route groups or on individual routes.

###### Route Group Example:

[](#route-group-example)

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

###### Individual Route Examples:

[](#individual-route-examples)

```
    Route::get('/', 'WelcomeController@welcome')->middleware('https');
```

##### From Controller File:

[](#from-controller-file)

- You can include the `https` in the contructor of your controller file.

###### Controller File Example:

[](#controller-file-example)

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

### License

[](#license)

Laravel-Https is licensed under the MIT license. Enjoy!

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

3029d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/712577?v=4)[Novianto Rahmadi](/maintainers/novay)[@novay](https://github.com/novay)

---

Tags

httpsLaravel HttpsSecure HttpHTTPS Middleware

### Embed Badge

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

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

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[roave/security-advisories

Prevents installation of composer packages with known security vulnerabilities: no API, simply require it

2.9k97.3M6.4k](/packages/roave-security-advisories)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M113](/packages/mews-purifier)[jeremykenedy/laravel-https

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.

36133.5k](/packages/jeremykenedy-laravel-https)[kelunik/acme

ACME library written in PHP.

121603.9k3](/packages/kelunik-acme)[acmephp/core

Raw implementation of the ACME protocol in PHP

38973.7k7](/packages/acmephp-core)

PHPackages © 2026

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