muhammadsadeeq/laravel-activitylog-ui
Modern UI for Spatie laravel-activitylog: table, timeline and analytics dashboards with powerful filters, saved views, exports (CSV/Excel/PDF/JSON), caching for fast counts/pagination, and authorization controls. Tailwind + Alpine, no build step.
laravel-activitylog), making it a low-risk add-on for teams already using Spatie’s package. It does not replace core logging functionality but enhances observability.config/activitylog-ui.php) allows granular customization without monolithic changes.activity_log table schema matches v5.laravel-activitylog (≥v5) installed and configured. This is a hard blocker for adoption—teams without this will need to implement it first (non-trivial for legacy systems).activity_log table to include the attribute_changes column (introduced in Spatie v5). Teams on older schemas will need to migrate data or use legacy fallbacks (see changelog).maatwebsite/excel, barryvdh/laravel-dompdf), adding minor complexity but not breaking functionality./activitylog-ui) is unlikely to conflict, but customization via config/activitylog-ui.php allows adjustment.| Risk Area | Severity | Mitigation |
|---|---|---|
| Schema Mismatch | High | Validate activity_log schema during installation. Use php artisan migrate to ensure compatibility. |
| PHP/Laravel Version Gaps | Medium | Requires PHP 8.4+ and Laravel 12+. Teams on older versions must upgrade or use v1.x (unsupported). |
| Performance at Scale | Medium | Large datasets may impact UI responsiveness. Configure exports.max_records and enable queued exports. |
| Authorization Complexity | Low | Default gate (viewActivityLogUi) is auto-registered, but custom policies may need adjustment. |
| Frontend Asset Conflicts | Low | Tailwind/Alpine are isolated; conflicts unlikely unless custom CSS/JS overrides exist. |
laravel-activitylog?
php artisan vendor:publish) allows UI tweaks, but Alpine.js/Tailwind knowledge may be required.composer require spatie/laravel-activitylog ^5.0
php artisan vendor:publish --provider="Spatie\Activitylog\ActivitylogServiceProvider" --tag="activitylog-migrations"
php artisan migrate
composer require muhammadsadeeq/laravel-activitylog-ui
php artisan vendor:publish --provider="MuhammadSadeeq\ActivitylogUi\ActivitylogUiServiceProvider" --tag="activitylog-ui-config"
php artisan vendor:publish --provider="MuhammadSadeeq\ActivitylogUi\ActivitylogUiServiceProvider" --tag="activitylog-ui-assets"
config/activitylog-ui.php:
'authorization' => [
'enabled' => true,
'gate' => 'viewActivityLogUi',
],
App\Providers\AuthServiceProvider:
Gate::define('viewActivityLogUi', function ($user) {
return $user->hasRole(['admin', 'auditor']); // Custom logic
});
composer require maatwebsite/excel barryvdh/laravel-dompdf
/activitylog-ui and verify:
laravel-activitylog-ui.exports.max_records or enable queued exports.laravel-activitylog (updates may require UI adjustments).maatwebsite/excel, barryvdh/laravel-dompdf (for exports).php artisan migrate).php artisan route:list to verify routes.storage/logs/laravel.log).created_at, causer_id, subject_id.exports.max_records).cache_duration in config.| Failure Scenario | Impact | Mitigation |
|---|
How can I help you explore Laravel packages today?