File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,12 @@ An elastic-search based session driver for Laravel 5.1
33
44##How to use
55 1 . Require it via composer
6+
67 ```
78 composer require itvisionsy/laravel-elastic-sessions
89 ```
910 2. Add it to the providers list in `config/app.php`:
11+
1012 ```php
1113 'providers' => [
1214 //...
@@ -15,6 +17,7 @@ An elastic-search based session driver for Laravel 5.1
1517 ]
1618 ```
1719 3. Set the correct settings in `config/session.php`
20+
1821 ```php
1922 "driver" => "elastic",
2023 "elastic" => [
@@ -29,6 +32,7 @@ An elastic-search based session driver for Laravel 5.1
2932Elastic will detect the mapping by default, however, it is recommended to set the mapping explicitly.
3033
3134You can do so manually by applying this mapping to the index and type:
35+
3236```json
3337{
3438 "index":"set_the_index",
@@ -44,6 +48,7 @@ You can do so manually by applying this mapping to the index and type:
4448```
4549
4650Or simpler, the package can do it for you. You will need to tinker ` ./artisan tinker ` and then set the mapping:
51+
4752``` php
4853\ItvisionSy\LaravelElasticSessionDriver\ElasticSessionStore::putMapping();
4954```
You can’t perform that action at this time.
0 commit comments