PHPackages                             itvisionsy/laravel-elastic-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. [Search &amp; Filtering](/categories/search)
4. /
5. itvisionsy/laravel-elastic-session

ActiveLibrary[Search &amp; Filtering](/categories/search)

itvisionsy/laravel-elastic-session
==================================

A laravel 5.1 session driver on elasticsearch

v1.1.3(10y ago)42403MITPHPPHP &gt;=5.5.0

Since Nov 7Pushed 9y ago1 watchersCompare

[ Source](https://github.com/itvisionsy/laravel-elastic-session)[ Packagist](https://packagist.org/packages/itvisionsy/laravel-elastic-session)[ RSS](/packages/itvisionsy-laravel-elastic-session/feed)WikiDiscussions master Synced today

READMEChangelog (6)Dependencies (3)Versions (7)Used By (0)

Laravel Elastic Session Driver
==============================

[](#laravel-elastic-session-driver)

An elastic-search based session driver for Laravel 5.1

How to use
----------

[](#how-to-use)

1. Require it via composer

    ```
    composer require itvisionsy/laravel-elastic-sessions

    ```
2. Add it to the providers list in `config/app.php`:

    ```
    'providers' => [
    //...
    ItvisionSy\LaravelElasticSessionDriver\ElasticSessionServiceProvider::class,
    //...
    ]
    ```
3. Set the correct settings in `config/session.php`

    ```
    "driver" => "elastic",
    "elastic" => [
        "url" => "http://localhost:9200/",
        "index" => "laravel-es-sessions",
        "type" => "session"
    ],
    "lifetime" => 30
    ```

    Values shown above for elastic parameter are the default values in case you did not configure.

Index/Type mapping
------------------

[](#indextype-mapping)

Elastic will detect the mapping by default, however, it is recommended to set the mapping explicitly.

You can do so manually by applying this mapping to the index and type:

```
{
    "index":"set_the_index",
    "type":"set_the_type",
    "body":{
        "properties":{
            "created":{"type":"date"},
            "updated":{"type":"date"},
            "data":{"type":"string","index":"no"}
        },
        "_ttl":{
            "enabled":true,
            "default":"30m"
        }
    }
}
```

Or simpler, the package can do it for you. You will need to tinker `./artisan tinker` and then set the mapping:

```
\ItvisionSy\LaravelElasticSessionDriver\ElasticSessionStore::putMapping();
```

Please note that the `putMapping()` method will automatically read the values from your sessions config file including the `session.lifetime` value (in minutes) which will be used as the default TTL value.

Author
------

[](#author)

Muhannad Shelleh

License
-------

[](#license)

This code is published under [MIT](LICENSE) license.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~27 days

Recently: every ~34 days

Total

6

Last Release

3758d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/11ac511b34acf3f7e9a138d3b1a0a868303b376ab991bb176e8ea474857a0e57?d=identicon)[mhh1422](/maintainers/mhh1422)

---

Top Contributors

[![mhh1422](https://avatars.githubusercontent.com/u/499764?v=4)](https://github.com/mhh1422 "mhh1422 (24 commits)")

---

Tags

elasticelasticsearchlaravellaravel51phpsession-driver

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/itvisionsy-laravel-elastic-session/health.svg)

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

###  Alternatives

[awesome-nova/dependent-filter

Dependent filters for Laravel Nova

26193.1k](/packages/awesome-nova-dependent-filter)[algolia/php-dom-parser

A simple tool to turn DOM into Algolia search friendly record objects.

181.8k](/packages/algolia-php-dom-parser)

PHPackages © 2026

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