rmsramos/activitylog
A Laravel package for logging user and model activity to the database. It provides traits and helpers to record who changed what and when, then query activities to build audit trails, dashboards, and activity feeds with customizable models and a clean API.
composer require rmsramos/activitylog. This package is a Filament plugin that provides a UI for spatie/laravel-activitylog. Ensure you have Filament (v3+) and Spatie’s activitylog installed and migrated.php artisan vendor:publish --tag="activitylog-config". Review config/activitylog.php to set navigation labels, permissions, and whether to enable restore actions.->plugin(ActivitylogPlugin::make()). This adds an “Activity Log” resource to your admin panel where you can browse, filter, and inspect all logged activities.LogsActivity trait to a model (e.g., Order). Perform some actions, then open the Activity Log resource in Filament to see the entries. You can filter by subject, causer, event, and date. For a specific record, add the provided relation manager (ActivitylogRelationManager) to your resource to show its activity history inline.ActivitylogRelationManager to any Filament resource to display a table of activities for that record. This is the most common day‑to‑day pattern—reviewing changes to a single order, user, or product without leaving the edit page.withoutLogging() and withChanges() if available (Spatie v5), so the restore itself isn’t logged and the original attribute changes are preserved. Use this as an “undo” mechanism directly from the log.attribute_changes; for older v4 logs it falls back to properties.old / properties.attributes. This means you can upgrade Spatie without losing the ability to view historical diffs, but new logs will use the v5 format.ActivitylogResource or publish the views to tailor columns, filters, and actions. You can also override the Activity model if you need extra scopes or accessors.LogsActivity trait with custom getActivitylogOptions() to control which attributes are logged and how events are described. The package renders whatever Spatie stores, so your logging configuration directly shapes the UI.attribute_changes column and drop batch_uuid. Without it, new logs won’t have the expected column and diffs may not render. Follow Spatie’s UPGRADING guide.subject_returns_soft_deleted_models becomes include_soft_deleted_subjects. Update your config/activitylog.php accordingly; the package relies on this for restore actions.withoutLogging() and withChanges() only when those methods exist (v5). On v4, the fallback restores without these safeguards, so test restore behaviour after upgrading.activitylog:clean command and consider adding indexes on subject_type, subject_id, and created_at for performance.viewAny ability on the Activity model.LogsActivity, that log_name matches any filters, and that the Activity model is correctly configured in config/activitylog.php. The package’s resource uses the default Spatie\Activitylog\Models\Activity unless overridden.--tag="activitylog-views") to customise the table and infolist. You can also bind a custom ActivitylogResource in your panel if you need deeper changes.How can I help you explore Laravel packages today?