Forem

Cover image for Laravel VisitLog
Sarfraz Ahmed
Sarfraz Ahmed

Posted on

9 2

Laravel VisitLog

VisitLog is a simple Laravel 5 package that can be used to log visitor information and save it into database.

GitHub logo sarfraznawaz2005 / visitlog

⏰ Laravel package to log visitor information into database.

Laravel VisitLog

Total Downloads

Introduction

VisitLog is a simple Laravel 5 package that can be used to log visitor information and save it into database.

Features

  • Other than basic log such as IP, Browser and OS, it can also log Location information.
  • Allows to log both unique and non-unique visits based on IP.
  • Allows to cache the visits based on IP.
  • Allows to log authenticated user info.
  • Provides log viewer page out of box.
  • Provides basic http authentication for app users.
  • Ability to ban users by their IP

Note: VisitLog cannot detect same user/IP coming from some anonymizer so it cannot differentiate that.

Screenshot

Main Window

Note: Info in above screenshot is fake.

Requirements

  • PHP >= 5.5.9
  • Laravel 5

Installation

Install via composer

composer require sarfraznawaz2005/visitlog

For Laravel < 5.5:

Add Service Provider to config/app.php in providers section

Sarfraznawaz2005\VisitLog\VisitLogServiceProvider::class,
Enter fullscreen mode Exit fullscreen mode

Add Facade to config/app.php in aliases section

'VisitLog' => Sarfraznawaz2005
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay