Skip to content
forked from weboAp/Visitor

Register your visitors, Page hits, and count for Laravel

Notifications You must be signed in to change notification settings

Yassin3007/Visitor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Visitor

Register your visitors, Page hits for Laravel 5

for laravel 4 use ver v1.0.0

Installation

The recommended way to install Visitor is through composer.

Step 1

run

composer require weboap/visitor

Step 2

Add if your laravel version is < 5.5

	Weboap\Visitor\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


Visitor::get();
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.

Enjoy!

About

Register your visitors, Page hits, and count for Laravel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%