PHPackages                             trafficsupply/sessions - 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. trafficsupply/sessions

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

trafficsupply/sessions
======================

Sync sessions across multiple domains with a unique session key

05PHP

Since Sep 17Pushed 7y ago1 watchersCompare

[ Source](https://github.com/TrafficSupply/Sessions)[ Packagist](https://packagist.org/packages/trafficsupply/sessions)[ RSS](/packages/trafficsupply-sessions/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

TrafficSupply Sessions
======================

[](#trafficsupply-sessions)

Ever came across the problem that you have multiple domains on laravel, but not a single shared id? Want to preserve session information like carts or information filled out in a form on all your sites? TrafficSupply Sessions is just for that!

This package for laravel gives you the opportunity to share a unique ID across multiple domains run on the same or multiple laravel installations, with one url sharing all the unique id's, for all the other domains!

To set it up simply require the package

```
composer require trafficsupply/sessions

```

After that you can set the master domain in either your `.env` file:

```
MASTER_DOMAIN=sessions.example.com

```

or the config, which you can publish with the following command

```
php artisan vendor:publish --provider="TrafficSupply\Sessions\ServiceProvider"

```

How it works
------------

[](#how-it-works)

The master domain creates a unique key with the [Laravel UUID package](https://github.com/webpatser/laravel-uuid), made by Webpatser, which is saved into the session and a cookie. Each request that uses the `sessions` middleware, will have a JavaScript injected just before the head closes. This JavaScript checks if the unique ID requested from the master domain is equal to what is saved in the local session. If not, push it to the server with an XMLHttpRequest.

ToDo
----

[](#todo)

- add credentials to the XMLHttpRequest;
- posibility to reload after a new unique ID has been set;

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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/5301e13dbd1db60887ae47c6729342f9a46489fbf15ec076ef0faa5b83e7895b?d=identicon)[SerendipityNL](/maintainers/SerendipityNL)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/trafficsupply-sessions/health.svg)

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

###  Alternatives

[pharaonic/php-dot-array

Access array data quickly/easily using dot-notation and asterisk.

1011.6k3](/packages/pharaonic-php-dot-array)

PHPackages © 2026

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