Activity Log Logo
Getting Started

Installation

Install relaticle/activity-log, index your tables, and wire the panel plugin.

Requirements

  • PHP 8.4+
  • Laravel 12
  • Filament 5
  • spatie/laravel-activitylog ^5

Install the package

Terminal
composer require relaticle/activity-log

What auto-discovery wires up

The service provider (Relaticle\ActivityLog\ActivityLogServiceProvider) is auto-discovered and registers:

  • Config file at config/activity-log.php (via spatie/laravel-package-tools)
  • Views under the activity-log::* namespace
  • Translations under the activity-log::messages.* namespace
  • RendererRegistry and TimelineCache singletons
  • The activity-log Livewire component (Relaticle\ActivityLog\Filament\Livewire\ActivityLogLivewire)
  • The built-in Relaticle\ActivityLog\Renderers\ActivityLogRenderer, auto-registered for the 'activity_log' type

Publish the config (optional)

Only needed if you want to override defaults:

Terminal
php artisan vendor:publish --tag=activity-log-config

See Configuration for the full key reference.

Database & indexing

The package owns no migrations; it reads from tables already present in your application.

TableOwnerRole
activity_logspatie/laravel-activitylogPrimary source of activity_log (own log) and related-log entries via fromActivityLog() and fromActivityLogOf().
Your related tablesYour appSources registered via fromRelation() read their own timestamp columns.

Required index

Add this compound index to the spatie activity_log table for responsive timeline queries:

Schema::table('activity_log', function (Blueprint $table) {
    $table->index(['subject_type', 'subject_id', 'created_at']);
});

Without it, paginating large logs scans significantly more rows than necessary.

When you register fromRelation('tasks', fn ($s) => $s->event(column: 'completed_at', ...)), the source filters the related table by the configured timestamp column. Index those columns when the related table is large.

Tailwind theme integration

If your panel uses a custom theme.css, add the plugin's views to the Tailwind source list so the utilities used by the Blade templates are compiled:

resources/css/filament/{panel}/theme.css
@source '../../../../vendor/relaticle/activity-log/resources/views/**/*';

Without this line, you may see unstyled or partially-styled timeline entries in production builds. Skip this step if your panel uses the default Filament theme — Tailwind is already wired.

Register the panel plugin (optional)

Only needed when you want to register custom renderers; auto-discovery covers everything else.

use Relaticle\ActivityLog\Filament\ActivityLogPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugin(ActivityLogPlugin::make())
        // ... rest of panel config
    ;
}

See Customization for what to pass to ->renderers().

Next

Head to Quick start for the 5-minute working timeline.

Copyright © 2026