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. [HTTP &amp; Networking](/categories/http)
4. /
5. parallax/laravel-protocol

ActiveLibrary[HTTP &amp; Networking](/categories/http)

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 yesterday

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 18% 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://avatars.githubusercontent.com/u/47539?v=4)[James Hall](/maintainers/MrRio)[@MrRio](https://github.com/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)
```

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25025.5M80](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.2M6.6k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k20.0k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87930.4k113](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.3M84](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69122.6k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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