Skip to content
Register your visitors, Page hits, and count for Laravel
Branch: master
Clone or download
Latest commit d8bc4a9 Aug 5, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Apply fixes from StyleCI Jan 9, 2017
.gitignore error #4 fix Jun 7, 2015
.travis.yml error #4 fix Jun 7, 2015 corrected typo! Aug 4, 2018
composer.json adapt package to laravel 5.5 Sep 2, 2017
phpunit.xml error #4 fix Jun 7, 2015


Register your visitors, Page hits for Laravel 5

for laravel 4 use ver v1.0.0


The recommended way to install Visitor is through composer.

Step 1


composer require weboap/visitor

Step 2

Add if your laravel version is < 5.5


to the list of service providers in app/config/app.php

Step 3

Migrate the Visitor Table Run

php artisan vendor:publish


php artisan migrate

to migrate visitor table

the config.php will be copied to /config at the same time


costumize it accordinly

Step 5 (Optional)


download GeoLite2-City.mmdb

place it in (create the geo directory)


or where ever you want just adjust the package config to reflect the new location, it's used to geo locate visitors


Visitor::log();   //log in db visitor ip, geo location, hit counter

Visitor::get( $ip );   //fetch ip record

Visitor::forget( $ip ); //delete ip from log

Visitor::has( $ip );   // checkk if visitor ip exist in log

Visitor::count()  // return count of all site registred unique visitors

Visitor::all();  // all records as array

Visitor::all(true);  // all records as collection

Visitor::clicks(); //total of all clicks

Visitor::range($date_start, $date_end); // visitors count in a date range;

###Credits This product Uses GeoLite2 data created by MaxMind, whenever available.


You can’t perform that action at this time.