PHPackages                             cassiobueno90/visitor-log - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. cassiobueno90/visitor-log

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

cassiobueno90/visitor-log
=========================

A package for Laravel 4 to log all visitors

v0.0.1.x-dev(8y ago)027PHPPHP &gt;=5.3.0

Since Jul 25Pushed 8y ago1 watchersCompare

[ Source](https://github.com/cassiobueno90/visitor-log)[ Packagist](https://packagist.org/packages/cassiobueno90/visitor-log)[ RSS](/packages/cassiobueno90-visitor-log/feed)WikiDiscussions v0.0.1 Synced 3w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

\#Laravel 4 VisitorLog

A package for Laravel 4 to log all visitors

If anyone has any ideas on how to make this framework agnostic, please contact me or open a pull request.

\##Installation

Add `cassiobueno90/visitor-log` as a requirement to `composer.json`:

```
{
    ...
    "require": {
        ...
        "cassiobueno90/visitor-log": "dev-master"
        ...
    },
}
```

Update composer:

```
$ php composer.phar update

```

Add the provider to your `app/config/app.php`:

```
'providers' => array(

    ...
    'Cassiobueno90\VisitorLog\VisitorLogServiceProvider',

),
```

Add the alias to your `app/config/app.php`:

```
'aliases' => array(

    ...
	'Visitor'		  => 'Cassiobueno90\VisitorLog\Visitor',

),
```

Publish migration:

```
$ php artisan migrate --package=cassiobueno90/visitor-log

```

(Optional) Publish package config:

```
$ php artisan config:publish cassiobueno90/visitor-log

```

\##Configuration

- `onlinetime`: The time (in minutes) while a visitor is still saved
- `usermodel`: Set this to the Auth Provider you're using:
    - `Laravel`: Visitor-Log will try to get the User with Laravel's Auth Class
    - `Sentry`: Visitor-Log will try to get the User with Sentry
- `ignore`: This is an array of pages that will be ignored by Visitor-Log. Example "admin/online"

\##The Visitor Class The Visitor Class is an Eloquent Class but has a few extra methods, which will be explained here.

- `static isOnline($id)`: Will check whether the user with `$id` is online
- `static getCurrent()`: Will get the current Visitor (based on their sid)
- `static clear()`: **Buggy!!** This removes all old visitors from the Database. You normally don't need to call this as this happens on every request.
- `static loggedIn()`: Will get all logged in Users
- `static guests()`: Will get all guests
- `static findUser($id)`: Will get the User provided by `$id` (if online)
- `static findIp($ip)`: Will get all visitors with `$ip`
- `isUser()`: Checks whether this visitor is a User
- `isGuest()`: Checks whether this visitor is a Guest

There are a few methods that wraps the specific Useragent method:

- `is_browser()`: Checks whether this visitor uses a browser
- `is_robot()`: Checks whether this visitor is a bot
- `is_mobile()`: Checks whether this visitor uses a mobile client
- `is_referral()`: Checks whether this visitor is a referral

The Visitor Class also provides some attributes:

- `sid`: A random String which is used to identicate the visitor
- `ip`: The IP of the visitor
- `page`: The Page where the visitor is
- `useragent`: The useragent of the visitor
- `user`: The UserID of the visitor
- The timestamps (`created_at`, `updated_at`)
- `agent`: Returns the useragent Instance used for this visitor
- `agents`: Returns the modified Agentstring (eg Opera 12.16)
- `platform`: Returns the operating System
- `browser`: Returns the Browser which is used
- `version`: Returns the Browser version which is used
- `robot`: Returns the Botname which is browsing your site
- `mobile`: Returns the mobile which is used
- `referrer`: Returns the referrer

\##What's with an "Who's online page"? It's really easy to add one by yourself but Visitor-Log provides you already a very simple one: simply add `@include("visitor-log::online")` to your blade template where you want. And the best: It's ready to look nice with bootstrap

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 54.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3255d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f6634620fc41340c8b6d3a9a8e50b205995c318f3c21045cc4595f2d59d13537?d=identicon)[cassiobueno90](/maintainers/cassiobueno90)

---

Top Contributors

[![cassiobueno90](https://avatars.githubusercontent.com/u/8821407?v=4)](https://github.com/cassiobueno90 "cassiobueno90 (13 commits)")[![uniacid](https://avatars.githubusercontent.com/u/209640?v=4)](https://github.com/uniacid "uniacid (9 commits)")[![JN-Jones](https://avatars.githubusercontent.com/u/1917879?v=4)](https://github.com/JN-Jones "JN-Jones (2 commits)")

---

Tags

loglaravelsentryvisitor

### Embed Badge

![Health badge](/badges/cassiobueno90-visitor-log/health.svg)

```
[![Health](https://phpackages.com/badges/cassiobueno90-visitor-log/health.svg)](https://phpackages.com/packages/cassiobueno90-visitor-log)
```

###  Alternatives

[sentry/sentry-laravel

Laravel SDK for Sentry (https://sentry.io)

1.3k122.6M185](/packages/sentry-sentry-laravel)[spatie/laravel-health

Monitor the health of a Laravel application

87411.3M152](/packages/spatie-laravel-health)[larabug/larabug

Laravel 6.x/7.x/8.x/9.x/10.x/11.x/12.x/13.x bug notifier

299571.0k1](/packages/larabug-larabug)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

419662.2k5](/packages/yadahan-laravel-authentication-log)[sarfraznawaz2005/visitlog

Laravel package to log visitor information into database.

8816.9k](/packages/sarfraznawaz2005-visitlog)[spatie/laravel-flare

Send Laravel errors to Flare

111.2M6](/packages/spatie-laravel-flare)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
