| Package Data | |
|---|---|
| Maintainer Username: | liquirice |
| Maintainer Contact: | liquirice@gmail.com (liquirice) |
| Package Create Date: | 2015-12-09 |
| Package Last Update: | 2015-12-09 |
| Language: | PHP |
| License: | Unknown |
| Last Refreshed: | 2025-12-11 03:22:49 |
| Package Statistics | |
|---|---|
| Total Downloads: | 13 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 1 |
| Total Watchers: | 1 |
| Total Forks: | 0 |
| Total Open Issues: | 0 |
A Laravel Service Provider push user behavior log or any log to Aws sqs.
Using php artisan queue:listen to digest the queue and insert data into elasticsearch.
Install using composer:
$ composer require liquirice/elasticlog
$ composer install
Install manually in composer.json:
"require": {
...
"liquirice/qelastic": "~1.0.0"
...
},
Add the service provider in app/config/app.php:
'providers' => array(
...
Liquirice\Qelastic\QelasticServiceProvider::class,
...
)
We have already added the Qelastic alias for you:
'aliases' => array(
...
'Qelastic' => 'Liquirice\Qelastic\Facades\Qelastic',
...
)
Add the elasticsearch hostname and queue path in .env:
...
ELASTICSEARCH_HOST=127.0.0.1:9200
QUEUE_PATH=App\Jobs\Track\UserBehavior
...
Start by creating an Qelastic instance (or use the Qelastic Facade if you are using Laravel):
Qelastic::pushToQueue(array(
'user_id' => '1',
'action' => 'click',
'object' => 'event',
'object_id' => '50786',
'param' => '{
"user_name": "admin",
"email" : "admin@example.com"
}'
))
Note: Test case not yet finish
- Check input data is array or not.
- Test unexpected data insert.
- Check data whether push to queue or not.
Qelastic is licensed under The MIT License (MIT).