PHPackages                             parallax/laravel-protocol - 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. parallax/laravel-protocol

ActiveLibrary

parallax/laravel-protocol
=========================

Handles detection of http protocol and changes internal links and redirects

044PHP

Since Mar 1Pushed 8y ago4 watchersCompare

[ Source](https://github.com/parallax/laravel-protocol)[ Packagist](https://packagist.org/packages/parallax/laravel-protocol)[ RSS](/packages/parallax-laravel-protocol/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Protocol
================

[](#laravel-protocol)

Handles detection of http protocol and changes internal links and redirects to match.

### Installation

[](#installation)

You will need composer to install this package (get composer). Then run:

```
composer require parallax/laravel-protocol
```

#### Register Service Provider

[](#register-service-provider)

Add the below into your `config/app.php` within `providers` array

```
Parallax\Protocol\ProtocolServiceProvider::class

```

After installation you will need to publish the config file. To do this run:

```
php artisan vendor:publish --tag=protocol.config
```

This will create the file `config/protocol.php` where you can configure the settings.

### Configuration

[](#configuration)

#### `auto`

[](#auto)

If set to true this will automatically match the internal links to the current users protocol.

#### `protocol`

[](#protocol)

If set this will force internal links and redirect users to the set protocol. Accepted values are `http` or `https`. Leave blank to not set.

#### `environments`

[](#environments)

You can add your own name for environments within this array. The key of the array should match your used `APP_ENV` values for it to detect correctly.

Within each environment you can set `https` to `true` or `false`. If `true` this will change all internal linking to `https`. If you set `redirect` to `true` then this will force all users to `https`, but only if you have set `https` to `true`.

##### Example Config

[](#example-config)

```
/**
 * Automatically detect based on current protocol
 */
'auto' => false,

/**
 * Force everything to a set protocol either
 * 'http' or 'https'. If blank then won't
 * force anything. Ignored if 'auto' is true.
 */
'protocol' => '',

/**
 * Use different rules per environment
 * Ignored if 'auto' is true or 'protocol' is set.
 */
'environments' => [
    'local' => [
        'https' => false,
        'redirect' => false
    ],
    'production' => [
        'https' => true,
        'redirect' => false
    ]
]
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/09727647394ae17ae279110cc07d081f7eb306c6642faae9a02e15b3e27021a3?d=identicon)[MrRio](/maintainers/MrRio)

![](https://www.gravatar.com/avatar/41b413127c7499a63bcb5c5ae903bd8961ba29300b6ccbda873e0c4bf06d0a02?d=identicon)[jsefton](/maintainers/jsefton)

---

Top Contributors

[![jsefton](https://avatars.githubusercontent.com/u/4114741?v=4)](https://github.com/jsefton "jsefton (1 commits)")

### Embed Badge

![Health badge](/badges/parallax-laravel-protocol/health.svg)

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

PHPackages © 2026

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