https://github.com/jcc/visitors
https://github.com/jcc/visitors
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jcc/visitors
- Owner: jcc
- Created: 2016-03-31T07:51:29.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-02T12:04:33.000Z (about 10 years ago)
- Last Synced: 2025-06-09T02:04:41.317Z (about 1 year ago)
- Language: PHP
- Size: 12.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# visitors
modify with https://github.com/weboAp/Visitor
#Step 1
Just add to composer.json file:
```json
{
"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
```php
Visitor::log(); //log in db visitor ip, geo location, hit counter
```