Download the PHP package wg-vn/laravel-activitylog-ui without Composer
On this page you can find all versions of the php package wg-vn/laravel-activitylog-ui. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wg-vn/laravel-activitylog-ui
More information about wg-vn/laravel-activitylog-ui
Files in wg-vn/laravel-activitylog-ui
Package laravel-activitylog-ui
Short Description A beautiful, modern UI for Spatie's Activity Log with advanced filtering, analytics, and real-time features.
License MIT
Homepage https://github.com/wg-vn/laravel-activitylog-ui
Informations about the package laravel-activitylog-ui
Laravel Activity Log UI
Beautiful, modern UI for Spatie's Activity Log
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.
๐ Documentation
๐ Complete Documentation - Comprehensive guide with advanced features, customization options, and troubleshooting.
โจ Features
- Table, Timeline & Analytics dashboards
- Powerful filter panel (date presets, events, users, subjects, search)
- Saved views, per-page & sorting preferences
- Export to CSV / Excel / PDF / JSON
- Real-time count & pagination powered by Laravel cache
- Authorization gate, middleware & granular access lists
- Tailwind CSS & Alpine.js โ no build step required
๐๏ธ Requirements
- PHP โฅ 8.4
- Laravel 12 | 13
- spatie/laravel-activitylog โฅ 5.0 (already logging your activities)
- paperdoc-dev/paperdoc-lib ^1.1 (Excel & PDF exports)
- Database table
activity_logwith Spatie v5โs schema (includesattribute_changescolumn)
On Laravel 12 Composer resolves
spatie/laravel-activitylogto 5.0.0, because 5.1.0 requiresilluminate/* ^13.0. The schema and everything in this package behave the same on both; you are simply pinned to 5.0.x until you move to Laravel 13. Verified against Laravel 12.66 / Spatie 5.0.0 and Laravel 13.25 / Spatie 5.1.0.
๐ Installation
-
Install the package
-
(Optional) Publish resources
-
Run migrations
Ensure you have already run Spatieโs migrations so theactivity_logtable exists: -
(Recommended on a large log) Add the UIโs indexes
Spatie indexes the log for lookups by subject and causer. This UI lists everything newest first, which nothing indexes โ on a log of 200,000 rows MySQL answers a single page by reading every row and sorting the lot.Measured on 204,963 activities, this took the first page from 350 ms to 21 ms and let the analytics queries read an index instead of the table. It is a separate step because
activity_logis Spatieโs table and because building an index on an established log locks it while it runs โ about a second at that size, longer on a bigger one. - Visit the UI
โ๏ธ Configuration Overview
A full configuration file is published to config/activitylog-ui.php. Below is a quick reference:
Refer to the inline comments in the file for every available option.
๐๏ธ Custom Table or Connection
Spatie v5 removed the activitylog.table_name and activitylog.database_connection
settings. The supported way to move the log is a custom Activity model:
This UI reads that model's table and connection, so it follows the log wherever you put it โ no additional configuration here. Note it reads the location, not the model itself: scopes, casts and accessors you add to your model are not used by the UI's queries.
๐ Authorization & Access Control
Access is decided in this order:
authorization.enabled(defaulttrue, orACTIVITYLOG_UI_AUTHORIZATION) โ requires a logged-in user, then the gate below. Turning it off removes the login requirement.access.allowed_users/access.allowed_rolesโ if either is non-empty it is enforced regardless of step 1, so an allow-list still requires a matching logged-in user even with authorization disabled.- With authorization off and both lists empty, the UI is fully public: anyone who can reach the URL can read who did what, when, and to which record. That combination is for local development only.
Notes:
- Gate:
viewActivityLogUiis auto-registered (seeActivitylogUiServiceProvider). By default it allows any authenticated user and narrows to the lists above once you set them. Define your own to replace that logic. - Roles use
hasAnyRole()orhasRole()if your user model provides them (Spatie Permission and similar). Without either method, a user cannot match a role and is denied. route.middlewarereplaces the base stack (['web']) only. Authentication and the access middleware are appended afterwards and cannot be removed by it.- Requires a named
loginroute when authorization is on and a guest opens the UI in a browser โ that is Laravel'sauthmiddleware redirect. Apps without auth scaffolding should configureredirectGuestsTo()or leave authorization off. JSON requests get a401instead.
๐ค Exports
- CSV / Excel (XLSX) / PDF / JSON all work out-of-the-box, powered by paperdoc-dev/paperdoc-lib.
- Large exports can be queued; enable
exports.queue.enabled.
๐ Analytics Dashboard
Enable/disable with features.analytics. Caches stats for analytics.cache_duration seconds (default 1 h).
๐ค Contributing
PRs and issues are welcome!
๐ License
The MIT License (MIT). See LICENSE for details.
All versions of laravel-activitylog-ui with dependencies
illuminate/contracts Version ^13.32.0
paperdoc-dev/paperdoc-lib Version ^1.1
spatie/laravel-activitylog Version ^5.1.1