PHPackages                             mayaramyadav/spatie-activitylog-ui - 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. mayaramyadav/spatie-activitylog-ui

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

mayaramyadav/spatie-activitylog-ui
==================================

A beautiful, modern UI for Spatie's Activity Log with advanced filtering, analytics, and real-time features.

v0.1.0(3mo ago)05↑2900%MITBladePHP ^8.3

Since Apr 1Pushed 3mo agoCompare

[ Source](https://github.com/mayaramyadav/spatie-activitylog-ui)[ Packagist](https://packagist.org/packages/mayaramyadav/spatie-activitylog-ui)[ Docs](https://github.com/mayaramyadav/spatie-activitylog-ui)[ RSS](/packages/mayaramyadav-spatie-activitylog-ui/feed)WikiDiscussions main Synced 3mo ago

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

Laravel Activity Log UI
=======================

[](#laravel-activity-log-ui)

> Beautiful, modern UI for [Spatie's Activity Log](https://github.com/spatie/laravel-activitylog)
>
> **Important:** This package **assumes you already have Spatie's Activity Log installed and configured** in your Laravel application. It does *not* replace the logging package—only provides a powerful UI for viewing and analyzing the stored activities.

[![Activity Log UI Screenshot](laravel-spatie-activitylog-ui-screenshot.png)](laravel-spatie-activitylog-ui-screenshot.png)

---

📖 Documentation
---------------

[](#-documentation)

📚 **[Complete Documentation](https://www.sadeeq.dev/docs/laravel-spatie-activitylog-ui)** - Comprehensive guide with advanced features, customization options, and troubleshooting.

---

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

[](#-features)

- Table, Timeline &amp; Analytics dashboards
- Powerful filter panel (date presets, events, users, subjects, search)
- Saved views, per-page &amp; sorting preferences
- Export to **CSV / Excel / PDF / JSON**
    \* Optional Excel &amp; PDF exports require additional packages (see below)
- Real-time count &amp; pagination powered by Laravel cache
- Authorization gate, middleware &amp; granular access lists
- Tailwind CSS &amp; Alpine.js – no build step required

🗒️ Requirements
---------------

[](#️-requirements)

- PHP 8.4 | 8.5
- Laravel 12 | 13
- [spatie/laravel-activitylog](https://github.com/spatie/laravel-activitylog) v5
- Database table `activity_log` with Spatie’s default columns

### Required activity\_log structure

[](#required-activity_log-structure)

This package supports the Spatie v5 schema only:

ColumnType`id``bigint unsigned``log_name``varchar(255)` nullable`description``text``subject_type``varchar(255)` nullable`subject_id``bigint unsigned` nullable`event``varchar(255)` nullable`causer_type``varchar(255)` nullable`causer_id``bigint unsigned` nullable`attribute_changes``json` nullable`properties``json` nullable`created_at``timestamp` nullable`updated_at``timestamp` nullable### Optional (for export)

[](#optional-for-export)

FeaturePackageVersionExcel (XLSX)`maatwebsite/excel`^3.1PDF`barryvdh/laravel-dompdf`^2.0Add them when you need those formats:

```
composer require maatwebsite/excel barryvdh/laravel-dompdf
```

---

🚀 Installation
--------------

[](#-installation)

1. **Install the package**```
    composer require mayaram/spatie-activitylog-ui
    ```
2. **(Optional) Publish resources**```
    # Config file (config/spatie-activitylog-ui.php)
    php artisan vendor:publish --provider="Mayaram\SpatieActivitylogUi\SpatieActivitylogUiServiceProvider" --tag="spatie-activitylog-ui-config"

    # Blade views (if you want to customise)
    php artisan vendor:publish --provider="Mayaram\SpatieActivitylogUi\SpatieActivitylogUiServiceProvider" --tag="spatie-activitylog-ui-views"

    # Public assets (logo, js, css)
    php artisan vendor:publish --provider="Mayaram\SpatieActivitylogUi\SpatieActivitylogUiServiceProvider" --tag="spatie-activitylog-ui-assets"
    ```
3. **Run migrations**
    Ensure you have already run Spatie’s migrations so the `activity_log` table exists: ```
    php artisan vendor:publish --provider="Spatie\Activitylog\ActivitylogServiceProvider" --tag="activitylog-migrations"
    php artisan migrate
    ```
4. **Visit the UI**```
    /spatie-activitylog-ui   # default route prefix

    ```

---

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

[](#️-configuration-overview)

A full configuration file is published to `config/spatie-activitylog-ui.php`. Below is a quick reference:

```
return [
    'route' => [
        'prefix' => 'spatie-activitylog-ui', // URL prefix
        'middleware' => null,         // Auto-detected or custom array
    ],

    'authorization' => [
        'enabled' => false,           // true => uses Gate / auth middleware
        'gate'    => 'viewActivityLogUi',
    ],

    'access' => [
        'allowed_users' => [],        // user email whitelist
        'allowed_roles' => [],        // role names (Spatie Permission, etc.)
    ],

    'features' => [
        'analytics' => true,
        'exports'   => true,
        'saved_views' => true,
    ],

    'exports' => [
        'enabled_formats' => ['csv', 'xlsx', 'pdf', 'json'],
        'max_records'     => 10000,
        'queue' => [
            'enabled'   => false,
            'threshold' => 1000,
            'queue_name'=> 'exports',
        ],
    ],
];
```

Refer to the inline comments in the file for every available option.

---

🔐 Authorization &amp; Access Control
------------------------------------

[](#-authorization--access-control)

- **Gate:** `viewActivityLogUi` is auto-registered (see `SpatieActivitylogUiServiceProvider`). You may define it in your own code or rely on the package’s default email/role checks.
- **Toggle authentication:** Set `authorization.enabled` to `true` to require login + gate.
- **Granular lists:** `access.allowed_users` and `access.allowed_roles` let you open the UI to a subset of users—regardless of the gate.

---

📤 Exports
---------

[](#-exports)

- **CSV &amp; JSON** work out-of-the-box.
- **Excel (XLSX)** requires `maatwebsite/excel` – otherwise we gracefully fall back to CSV.
- **PDF** requires `barryvdh/laravel-dompdf` – otherwise we fall back to JSON.
- Large exports can be **queued**; enable `exports.queue.enabled`.

---

📈 Analytics Dashboard
---------------------

[](#-analytics-dashboard)

Enable/disable with `features.analytics`. Caches stats for `analytics.cache_duration` seconds (default 1 h).

---

🤝 Contributing
--------------

[](#-contributing)

PRs and issues are welcome!

---

📝 License
---------

[](#-license)

The MIT License (MIT). See `LICENSE` for details.

[![Latest Version on Packagist](https://camo.githubusercontent.com/dcced2c60f9020d831097fbbf27bd7ae791042308d8bf311d543d8308c5c39a8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d61796172616d2f7370617469652d61637469766974796c6f672d75692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mayaram/spatie-activitylog-ui)[![Total Downloads](https://camo.githubusercontent.com/7b6edb0dc6182ffa8c21889f9c0d559093707dcdf4378d1863c6152d6ae9b8ac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d61796172616d2f7370617469652d61637469766974796c6f672d75692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mayaram/spatie-activitylog-ui)

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance82

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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

92d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8e0770eeffe4c0f2b4f56aaf3cb23ce9b8704a61e7da89642c2adafee00c15fe?d=identicon)[mayaram](/maintainers/mayaram)

---

Top Contributors

[![mayaramyadav](https://avatars.githubusercontent.com/u/91020912?v=4)](https://github.com/mayaramyadav "mayaramyadav (15 commits)")

---

Tags

spatielaravelpdfloggingmonitoringuiexportexcelcsvlaravel-packageAudittailwindtimelinedashboardanalyticschartjsactivity-logalpinejsaudit-logactivityloglaravel-activitylog

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mayaramyadav-spatie-activitylog-ui/health.svg)

```
[![Health](https://phpackages.com/badges/mayaramyadav-spatie-activitylog-ui/health.svg)](https://phpackages.com/packages/mayaramyadav-spatie-activitylog-ui)
```

###  Alternatives

[muhammadsadeeq/laravel-activitylog-ui

A beautiful, modern UI for Spatie's Activity Log with advanced filtering, analytics, and real-time features.

17717.0k](/packages/muhammadsadeeq-laravel-activitylog-ui)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M159](/packages/spatie-laravel-health)[alizharb/filament-activity-log

A powerful, feature-rich activity logging solution for FilamentPHP v4 &amp; v5 with timeline views, dashboard widgets, and revert actions.

2871.8k2](/packages/alizharb-filament-activity-log)[mradder/filament-logger

Audit logging, activity tracking, exports, alerts, and dashboards for Filament admin panels.

2310.5k](/packages/mradder-filament-logger)[noxoua/filament-activity-log

A Laravel package that simplifies activity logging in the Filament admin panel, with support for logging create, update, delete, and restore actions. It integrates with the 'spatie/laravel-activitylog' package and includes a modernized activity log viewing page.

7254.6k](/packages/noxoua-filament-activity-log)

PHPackages © 2026

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