PHPackages                             fbollon/lara-visitors - 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. [Admin Panels](/categories/admin)
4. /
5. fbollon/lara-visitors

ActiveLibrary[Admin Panels](/categories/admin)

fbollon/lara-visitors
=====================

Laravel package that provides a dashboard and statistics for visits recorded by shetabit/visitor.

v1.0.1(4mo ago)03MITBladePHP ^8.2

Since Dec 16Pushed 4mo agoCompare

[ Source](https://github.com/fbollon/lara-visitors)[ Packagist](https://packagist.org/packages/fbollon/lara-visitors)[ Docs](https://github.com/fbollon/lara-visitors)[ RSS](/packages/fbollon-lara-visitors/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (4)Used By (0)

LaraVisitors
============

[](#laravisitors)

LaraVisitors is a Laravel package that provides a dashboard and statistics for visits recorded by [shetabit/visitor](https://github.com/shetabit/visitor).

---

✨ Features
----------

[](#-features)

- Dashboard with visit statistics
- Date filters
- CSV export
- Charts (Chart.js)
- Stats by user, URL, browser, device
- Localization (EN/FR)

[![Dashboard Screenshot](docs/images/dashboard.png)](docs/images/dashboard.png)

---

✅ Requirements
--------------

[](#-requirements)

- Laravel 11 or higher
- PHP 8.2+

---

📦 Installation
--------------

[](#-installation)

Install package via Composer:

```
composer require fbollon/lara-visitors
```

This will also install [shetabit/visitor](https://github.com/shetabit/visitor)

---

⚙️ Configuration
----------------

[](#️-configuration)

Since this package also installs the [shetabit/visitor](https://github.com/shetabit/visitor) package, we start with its configuration

### 1. Configure **shetabit/visitor**

[](#1-configure-shetabitvisitor)

Publish the configuration file:

```
php artisan vendor:publish --provider="Shetabit\Visitor\Provider\VisitorServiceProvider" --tag="config"
```

If needed, change the default table name in `config/visitor.php`:

```
// Name of the table where visit records should be saved
'table_name' => 'shetabit_visits',
```

Publish the migrations and run them:

```
php artisan vendor:publish --provider="Shetabit\Visitor\Provider\VisitorServiceProvider" --tag="migrations"
php artisan migrate
```

Add the middleware to `app/Http/Kernel.php` to automatically log visits:

```
protected $middlewareGroups = [
    'web' => [
        // other middlewares...
        \Shetabit\Visitor\Middlewares\LogVisits::class,
    ],
];
```

Add the trait to your `User` model:

```
use Shetabit\Visitor\Traits\Visitor;

class User extends Model {
    use Visitor;
}
```

---

### 2. Configure **fbollon/lara-visitors**

[](#2-configure-fbollonlara-visitors)

Publish the configuration file:

```
php artisan vendor:publish --tag=laravisitors-config
```

This will create `config/laravisitors.php` where you can customize:

- **provide\_assets**: Load Bootstrap 5, Chart.js, and Font Awesome (set to `false` if your app already includes them).
- **layout**: Define the layout used by package views.
    - If you want to use the minimal layout provided by the package, you must set provide\_assets to true.
- **access\_middleware**: Middlewares applied to package routes.
- **visits\_table**: Table name for visits (should match shetabit/visitor).
- **user\_model**: Your User model class.
- **user\_display\_attribute**: User attribute to display in dashboard.

Optional: Publish assets (CSS/JS) if you want to customize them:

```
php artisan vendor:publish --tag=laravisitors-assets
```

Optional: Publish the layout if you want to override the default:

```
php artisan vendor:publish --tag=laravisitors-layout
```

Optional: Publish lang file, if you want to override :

```
php artisan vendor:publish --tag=laravisitors-translations
```

---

🌍 Localization
--------------

[](#-localization)

LaraVisitors supports multiple languages (EN/FR).
To override translations:

```
php artisan vendor:publish --tag=laravisitors-translations
```

Files will be published to `lang/vendor/laravisitors/{locale}/messages.php`.

---

🔍 Usage
-------

[](#-usage)

Access the dashboard at:

```
/laravisitors/dashboard

```

---

✅ Example `config/laravisitors.php`
-----------------------------------

[](#-example-configlaravisitorsphp)

```
return [
    'provide_assets' => true,
    'layout' => 'laravisitors::layouts.minimal',
    'access_middleware' => ['web', 'auth', 'laravisitors.access'],
    'visits_table' => env('LARAVISITORS_TABLE', 'shetabit_visits'),
    'user_model' => env('LARAVISITORS_USER_MODEL', App\Models\User::class),
    'user_display_attribute' => 'name',
];
```

---

🛠 Contributing
--------------

[](#-contributing)

Feel free to submit issues or pull requests on [GitHub](https://github.com/fbollon/lara-visitors).

---

📄 License
---------

[](#-license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance74

Regular maintenance activity

Popularity3

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

Every ~2 days

Total

2

Last Release

142d ago

### Community

Maintainers

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

---

Tags

laravelvisitordashboardanalyticsstatisticsvisitorsshetabit

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/fbollon-lara-visitors/health.svg)

```
[![Health](https://phpackages.com/badges/fbollon-lara-visitors/health.svg)](https://phpackages.com/packages/fbollon-lara-visitors)
```

PHPackages © 2026

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