PHPackages                             mintellity/laravel-tabbed-session - 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. mintellity/laravel-tabbed-session

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

mintellity/laravel-tabbed-session
=================================

Separate session for each browser tab.

0.5.2(3mo ago)11171MITPHPPHP ^8.5 || ^8.5 || ^8.3 || ^8.2 || ^8.1

Since Apr 20Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/mintellity/laravel-tabbed-sessions)[ Packagist](https://packagist.org/packages/mintellity/laravel-tabbed-session)[ Docs](https://github.com/mintellity/laravel-tabbed-session)[ RSS](/packages/mintellity-laravel-tabbed-session/feed)WikiDiscussions main Synced yesterday

READMEChangelog (10)Dependencies (18)Versions (12)Used By (0)

Separate session for each browser tab.
======================================

[](#separate-session-for-each-browser-tab)

With this package, you can have a separate session for each browser tab. This is e.g. useful if you want to have a different tenant for each tab. This package utilizes a query parameter to identify the tab and stores all data in an array within the default session.

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

[](#installation)

You can install the package via composer:

```
composer require mintellity/laravel-tabbed-session
```

Add the middleware to your `app/Http/Kernel.php` file. Beware that the middleware must be added after the `StartSession` middleware and must be added before all other middlewares that should use the tabbed session:

```
protected $middleware = [
    // ...
    \Mintellity\LaravelTabbedSession\Http\Middleware\TabbedSessionMiddleware::class,
];
```

Add the JS script to e.g. your `resources/js/app.js` file:

```
require('../../vendor/mintellity/laravel-tabbed-session/resources/js/tabbedSession');
```

The default query parameter name is `tabId`. You can change this by editing your environment file and adding the following line. Take care that the parameter name is unique and does not conflict with other parameters in your routes. If you change the parameter name, you also have to change the name in the JS script:

```
BROWSER_TAB_URL_PARAMETER_NAME=browserTabId
```

```
require('../../vendor/mintellity/laravel-tabbed-session/resources/js/tabbedSession')('browserTabId');
```

Usage
-----

[](#usage)

To access the tabbed session, you can use the `browsserTab()->session()` helper function:

```
browserTab()->session()->put('foo', 'bar');
browserTab()->session()->get('foo'); // bar
```

Disable for some paths
----------------------

[](#disable-for-some-paths)

You can disable the TabbedSession entirely for specific paths. Include the paths in `$exclude` in the config. Regex-patterns matching against the path are also possible:

```
return [
    'exclude' => [
        'admin/*', // Will disable middleware for all paths matching this pattern, e.g. admin/user/create
    ]
]
```

Beware: The helper function `browserTab()` will throw an exception if used on a disabled path.

Frontend "Session"
------------------

[](#frontend-session)

This is an optional feature that lets you store some data per tab in a cookie. The cookie can also be accessed from the frontend.

> ⚠️ **This is not a secure way to store data!** The data is not encrypted and can be manipulated by the user. Use this feature only for data that is not security relevant.

### Installation

[](#installation-1)

Add the cookie to the list of unencrypted cookies in `App\Http\Middleware\EncryptCookies`:

```
$this->disableFor(config('tabbed-session.frontend-cookie-name'));
```

The cookie name can be changed by editing your environment file and adding the following line:

```
FRONTEND_TAB_SESSION_COOKIE_NAME=frontend_tab_session
```

And add the script to your `resources/js/app.js` file:

```
require('../../vendor/mintellity/laravel-tabbed-session/resources/js/frontendTabSession')('frontend_tab_session');
```

### Usage

[](#usage-1)

In the frontend with JS:

```
window.tabSessionStorage.set('foo', 'bar');
window.tabSessionStorage.get('foo'); // bar
```

From the backend:

```
browserTab()->frontendSession()->set('foo', 'bar');
browserTab()->frontendSession()->get('foo'); // bar
```

[See an example for implementing storing and setting the active Bootstrap nav/tab](./examples/Active%20Bootstrap%20Tab.md)

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [Mintellity GmbH](https://github.com/mintellity)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance81

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 62.4% 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 ~119 days

Recently: every ~259 days

Total

10

Last Release

99d ago

PHP version history (4 changes)0.1.0PHP ^8.0

0.3.0PHP ^8.1

0.5.0PHP ^8.3 || ^8.2 || ^8.1

0.5.1PHP ^8.5 || ^8.5 || ^8.3 || ^8.2 || ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/ecfef4b7d0ea49cb6ef08cbffa5d8fba85b1615061a93bf559b8e21b912afa92?d=identicon)[mintellity](/maintainers/mintellity)

---

Top Contributors

[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (332 commits)")[![mvdnbrk](https://avatars.githubusercontent.com/u/802681?v=4)](https://github.com/mvdnbrk "mvdnbrk (46 commits)")[![pforret](https://avatars.githubusercontent.com/u/474312?v=4)](https://github.com/pforret "pforret (16 commits)")[![sebastiandedeyne](https://avatars.githubusercontent.com/u/1561079?v=4)](https://github.com/sebastiandedeyne "sebastiandedeyne (14 commits)")[![Nielsvanpach](https://avatars.githubusercontent.com/u/10651054?v=4)](https://github.com/Nielsvanpach "Nielsvanpach (13 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (12 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (9 commits)")[![AdrianMrn](https://avatars.githubusercontent.com/u/12762044?v=4)](https://github.com/AdrianMrn "AdrianMrn (8 commits)")[![AlexVanderbist](https://avatars.githubusercontent.com/u/6287961?v=4)](https://github.com/AlexVanderbist "AlexVanderbist (7 commits)")[![riasvdv](https://avatars.githubusercontent.com/u/3626559?v=4)](https://github.com/riasvdv "riasvdv (7 commits)")[![mintellity](https://avatars.githubusercontent.com/u/13208418?v=4)](https://github.com/mintellity "mintellity (7 commits)")[![irfanm96](https://avatars.githubusercontent.com/u/42065936?v=4)](https://github.com/irfanm96 "irfanm96 (5 commits)")[![patinthehat](https://avatars.githubusercontent.com/u/5508707?v=4)](https://github.com/patinthehat "patinthehat (5 commits)")[![IGedeon](https://avatars.githubusercontent.com/u/694313?v=4)](https://github.com/IGedeon "IGedeon (4 commits)")[![crynobone](https://avatars.githubusercontent.com/u/172966?v=4)](https://github.com/crynobone "crynobone (4 commits)")[![abenerd](https://avatars.githubusercontent.com/u/7523903?v=4)](https://github.com/abenerd "abenerd (3 commits)")[![jessarcher](https://avatars.githubusercontent.com/u/4977161?v=4)](https://github.com/jessarcher "jessarcher (3 commits)")[![koossaayy](https://avatars.githubusercontent.com/u/6431084?v=4)](https://github.com/koossaayy "koossaayy (3 commits)")[![medilies](https://avatars.githubusercontent.com/u/35309918?v=4)](https://github.com/medilies "medilies (3 commits)")[![sixlive](https://avatars.githubusercontent.com/u/5108034?v=4)](https://github.com/sixlive "sixlive (3 commits)")

---

Tags

browsercomposerlaravelmintellitypackagephpsessionlaravelmintellitytabbed-session

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/mintellity-laravel-tabbed-session/health.svg)

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

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/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)[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)[tapp/filament-form-builder

User facing form builder using Filament components

132.4k3](/packages/tapp-filament-form-builder)

PHPackages © 2026

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