Package Data | |
---|---|
Maintainer Username: | jcc |
Maintainer Contact: | changejian@gmail.com (JiajianChan) |
Package Create Date: | 2016-03-31 |
Package Last Update: | 2016-04-02 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-14 15:00:47 |
Package Statistics | |
---|---|
Total Downloads: | 23 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 2 |
Total Watchers: | 3 |
Total Forks: | 0 |
Total Open Issues: | 1 |
modify with https://github.com/weboAp/Visitor
#Step 1
Just add to composer.json file:
{
"require": {
"cjjian/visitor": "dev-master"
}
}
then run
composer update
#Step 2
Add
Cjjian\Visitors\VisitorServiceProvider::class
to the list of service providers in app/config/app.php
#Step 3
Migrate the Visitor Table Run
php artisan vendor:publish
then
php artisan migrate
to migrate visitor table
the config.php will be copied to /config at the same time
/config/visitor.php costumize it accordinly
#Step 5 (Optional)
Visit http://dev.maxmind.com/geoip/geoip2/geolite2/
download GeoLite2-City.mmdb
place it in (create the geo directory)
storage/geo/ or where ever you want just adjust the package config to reflect the new location, it's used to geo locate visitors
#Usage
Visitor::log(); //log in db visitor ip, geo location, hit counter