2017 © Pedro Peláez
 

library elasticsessions

ElasticSearch Sessions Driver for Laravel PHP Framework

image

bebbolus/elasticsessions

ElasticSearch Sessions Driver for Laravel PHP Framework

  • Thursday, April 13, 2017
  • by bebbolus
  • Repository
  • 2 Watchers
  • 1 Stars
  • 48 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

ElasticSessions

a package to provide a ElasticSearch Sessions Driver for Laravel PHP Framework, (*1)

Requirements

ElasticSessions is born on top of Elastiquent, you must be running at least Elasticsearch 1.0. Elasticsearch 0.9 and below will not work and are not supported., (*2)

You need to set-up your own Index and Type for sessions and configure it in .env (ELS_INDEX_USER, ELS_TYPE_SESSION), (*3)

Set up

To begin configuration, first update the composer.json with the relative requirement and autoload sections:, (*4)

Require section for our custom package and third party libraries:, (*5)

...
"require": {
    ...
    "elasticquent/elasticquent": "dev-master",
    "bebbolus/elasticsessions": "dev-master"
},
...

Now add the following code on App\Config\App.php, (*6)

add app providers:, (*7)

'providers' => [
    ...
    Elasticquent\ElasticquentServiceProvider::class,
    ElasticSessions\ElasticSessionsServiceProvider::class, #CUSTOM ELASTIC SESSION PROVIDER
],

add third party Package Facades:, (*8)

'aliases' => [
    ...
    'Es' => Elasticquent\ElasticquentElasticsearchFacade::class,
],

run commands:, (*9)

> composer dump-autoload -o
> composer update
> php artisan vendor:publish --force

The .env of DEFAULT DEVELOPMENT ENVIRONMENT:, (*10)

SESSION_DRIVER=elastic

ELS_MAX_RESULT=20

ELS_SERVER=localhost
ELS_INDEX_USER=user
ELS_TYPE_SESSION=sessions

NB, (*11)

edit the .env file with the right configuration parameters for the application you will develp i.e. all the ELS_* parameters, etc..., (*12)

You need to set-up your own Index and Type for sessions and configure it in .env (ELS_INDEX_USER, ELS_TYPE_SESSION), (*13)

TODO

  1. TEST!!!!!!

The Versions

13/04 2017

dev-master

9999999-dev https://github.com/Bebbolus/ElasticSessions

ElasticSearch Sessions Driver for Laravel PHP Framework

  Sources   Download

MIT

The Requires

 

by Roberto Della Fornace
by Andrea Sabbatini

laravel php eloquent elasticsearch session