mirana / tracker
This package is abandoned and no longer maintained.
No replacement package was suggested.
A package for your laravel app to track your users.
v1.0.0
2017-03-31 06:47 UTC
Requires
- php: >=5.3
- jenssegers/mongodb: ^3.2
- jenssegers/mongodb-session: ^1.1
- laravel/framework: ~5
- nesbot/carbon: ~1.21
- ramsey/uuid: ~3
Suggests
- geoip2/geoip2: ~2.0
This package is not auto-updated.
Last update: 2020-01-24 16:44:39 UTC
README
Index
Installation
Require the tracker
package by executing the following command in your command line:
composer require mirana/tracker
Add the service provider to your config/app.php
file:
Mirana\Tracker\Laravel\TrackerServiceProvider::class,
Add the alias to the facade on your config/app.php
file:
'Tracker' => Mirana\Tracker\Laravel\TrackerFacade::class,
Publish tracker configuration:
php artisan vendor:publish
Add the Middleware to Laravel Kernel
Open the file app/Http/Kernel.php
and add the following to your web middlewares:
\Mirana\Tracker\Laravel\TrackerMiddleware::class,
Migrate it
If you have set the default connection to mongodb
as it's said in jenssegers/mongodb, you can
php artisan migrate
Update & Changelog
from v0.2.0 to v1.0.0 :
Database
- MySql database is not supported anymore & MongoDB will be used instead.*
- All migrations changed into a compatible version with MongoDB driver.
- session database column
uuid
changed intosession_id
.*
Facade
Tracker
will be used instead ofMtrack
.*
Tracker Session
- tracker session now in synced with laravel session through
session_id
column.
Usage
You can get all the Sessions
data as an array
by executing the following function in your code:
Tracker::session()
Or in *.blade.php
:
{{ Tracker::session() }}
All Tracker
functions:
session()
geoip()
device()
referrer()
cookie()
visits()