muhammadsadeeq/laravel-activitylog-ui
Modern, no-build Tailwind/Alpine UI for Spatie Laravel Activity Log v5: table, timeline, analytics, powerful filters, saved views, caching-backed pagination, exports (CSV/Excel/PDF/JSON), and granular authorization. Requires PHP 8.4+ and Laravel 12/13.
laravel-activitylog), making it a low-risk add-on for applications already using Spatie’s package. It does not replace the core logging mechanism but enhances observability.activity_log table (v5 schema), which must be pre-migrated. This is a blocker if the app uses an older Spatie version or a custom logging schema.spatie/laravel-activitylog (v5+), integration is straightforward (composer install + migrations).activity_log table schema (e.g., adding attribute_changes column) if using a custom logger.maatwebsite/excel, barryvdh/laravel-dompdf), adding minor complexity./activitylog-ui) is customizable but should be checked for conflicts.| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Schema Mismatch | High | Validate activity_log table schema before installation (use php artisan schema:dump). |
| PHP/Laravel Version | Medium | Enforce PHP 8.4+ and Laravel 12/13 in CI/CD pipelines. |
| Performance | Medium | Monitor query performance with large datasets (sorting by id instead of created_at). |
| Authorization | Low | Test gate/middleware integration with existing auth systems (e.g., Spatie Permissions). |
| Frontend Assets | Low | Publish assets (php artisan vendor:publish --tag=activitylog-ui-assets) for customization. |
spatie/laravel-activitylog?
activitylog-ui uses Laravel cache for real-time counts).maatwebsite/excel, dompdf) and potential build complexity.viewActivityLogUi gate).attribute_changes column).maatwebsite/excel (Laravel Excel).barryvdh/laravel-dompdf (DomPDF wrapper).spatie/laravel-activitylog is installed (≥v5.0).php artisan schema:dump to confirm activity_log schema matches Spatie v5.composer require muhammadsadeeq/laravel-activitylog-ui
php artisan vendor:publish --provider="MuhammadSadeeq\ActivitylogUi\ActivitylogUiServiceProvider" --tag="activitylog-ui-config"
php artisan migrate # Ensure Spatie migrations are up-to-date
config/activitylog-ui.php (routes, auth, features).'features' => [
'analytics' => false,
]
composer require maatwebsite/excel barryvdh/laravel-dompdf
/activitylog-ui), filters, and exports.viewActivityLogUi).| Component | Compatibility Notes |
|---|---|
| Spatie v5 | Required (v4+ may need schema adjustments). |
| Laravel Auth | Works with Laravel’s built-in auth, Spatie Permissions, or custom gates. |
| Blade/Inertia/SPA | Blade templates are publishable; SPA-friendly via API endpoints. |
| Queue Exports | Uses Laravel queues (e.g., exports queue) for large exports. |
| Caching | Relies on Laravel’s cache (Redis recommended for high traffic). |
muhammadsadeeq/laravel-activitylog-ui (MIT license).maatwebsite/excel, barryvdh/laravel-dompdf (separate licenses).UPGRADING.md steps).storage/logs/laravel.log (enable debug mode if needed).ActivitylogUiServiceProvider and middleware.id (not created_at) improves pagination speed.analytics.cache_duration).exports.queue.enabled) to avoid timeouts.activity_log has indexes on created_at, causer_id, subject_id.| Scenario | Impact | Mitigation |
|---|---|---|
| Spatie Schema Mismatch | UI breaks on missing columns | Run php artisan schema:dump pre-install; use UPGRADING.md for v1→v2. |
| Auth Misconfiguration | Unauthorized access | Test gates/middleware in config/activitylog-ui.php. |
| Export Job Failures | Timeouts for large exports | Enable queuing (exports.queue.enabled) and monitor exports queue. |
| Cache Stampedes | Analytics slow under load | Increase analytics.cache_duration or use Redis. |
| Frontend JS Errors | Broken UI | Check browser console |
How can I help you explore Laravel packages today?