Giter Site home page Giter Site logo

visitor's Introduction

#Visitor

Register your visitors, Page hits for Laravel 5

for laravel 4 use ver v1.0.0

Installation

The recommended way to install Winput is through composer.

Step 1

Just add to composer.json file:

{
    "require": {
        "weboap/visitor": "dev-master"
    }
}

then run

php composer.phar update

Step 2

Add

'Weboap\Visitor\VisitorServiceProvider'

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!

visitor's People

Contributors

weboap avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.