https://github.com/bebbolus/elasticsessions
a package to provide a ElasticSearch Sessions Driver for Laravel PHP Framework
https://github.com/bebbolus/elasticsessions
elasticsearch elasticsearch-sessions-driver laravel laravel-php-framework package php session session-driver session-drivers
Last synced: 3 months ago
JSON representation
a package to provide a ElasticSearch Sessions Driver for Laravel PHP Framework
- Host: GitHub
- URL: https://github.com/bebbolus/elasticsessions
- Owner: Bebbolus
- License: mit
- Created: 2017-03-30T08:11:30.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-13T15:45:16.000Z (about 8 years ago)
- Last Synced: 2025-01-16T02:23:22.064Z (4 months ago)
- Topics: elasticsearch, elasticsearch-sessions-driver, laravel, laravel-php-framework, package, php, session, session-driver, session-drivers
- Language: PHP
- Size: 35.2 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ElasticSessions
a package to provide a ElasticSearch Sessions Driver for Laravel PHP Framework## 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._**You need to set-up your own Index and Type for sessions and configure it in .env (ELS_INDEX_USER, ELS_TYPE_SESSION)**_
## Set up
To begin configuration, first update the composer.json with the relative requirement and autoload sections:
Require section for our custom package and third party libraries:
...
"require": {
...
"elasticquent/elasticquent": "dev-master",
"bebbolus/elasticsessions": "dev-master"
},
...
Now add the following code on _App\Config\App.php_add app providers:
'providers' => [
...
Elasticquent\ElasticquentServiceProvider::class,
ElasticSessions\ElasticSessionsServiceProvider::class, #CUSTOM ELASTIC SESSION PROVIDER
],
add third party Package Facades:'aliases' => [
...
'Es' => Elasticquent\ElasticquentElasticsearchFacade::class,
],
run commands:> composer dump-autoload -o
> composer update
> php artisan vendor:publish --force
The .env of DEFAULT DEVELOPMENT ENVIRONMENT:
SESSION_DRIVER=elastic
ELS_MAX_RESULT=20
ELS_SERVER=localhost
ELS_INDEX_USER=user
ELS_TYPE_SESSION=sessions
**_NB_**> edit the .env file with the right configuration parameters
> for the application you will develp
> i.e. all the ELS_* parameters, etc..._**You need to set-up your own Index and Type for sessions and configure it in .env (ELS_INDEX_USER, ELS_TYPE_SESSION)**_
## TODO
1. TEST!!!!!!