Search by

alfasix / alfakit-activity-log

faizanakbar10

Browse spatie/laravel-activitylog activities in an AlfaKit panel: an activity resource, a relation manager, a timeline entry and action logging.

Package info

github.com/alfasixbh/alfakit-activity-log

Homepage

Issues

pkg:composer/alfasix/alfakit-activity-log

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

v0.1.0 2026-10-18 13:05 UTC

This package is auto-updated.

Last update: 2026-10-18 14:00:33 UTC


README

by Alfa Six

Spatie Laravel Activitylog (v5) for AlfaKit panels: an activity resource, a relation manager, a timeline infolist entry and optional logging of AlfaKit actions. It renders in React, Vue and Svelte with AlfaKit's built-in components.

Installation

composer require alfasix/alfakit-activity-log

Install and migrate spatie/laravel-activitylog, and add LogsActivity to the models you want to log. Then register the plugin:

use AlfaSix\AlfakitActivityLog\ActivityLogPlugin;

$panel->plugin(
    ActivityLogPlugin::make()
        ->navigationGroup('Settings')
        ->authorize(fn (User $user): bool => $user->is_admin),
);

The log is at /{panel}/activity-log: filters by log name, event, causer, subject type and date, and a view page with the old → new changes and the custom properties.

Usage

use AlfaSix\AlfakitActivityLog\Concerns\LogsAlfakitActions;
use AlfaSix\AlfakitActivityLog\Infolists\Components\ActivityLogTimelineEntry;
use AlfaSix\AlfakitActivityLog\RelationManagers\ActivitiesRelationManager;

// A resource whose model uses LogsActivity: the record's activities as a tab.
public static function getRelations(): array
{
    return [ActivitiesRelationManager::class];
}

// An infolist timeline of the record's activities.
ActivityLogTimelineEntry::make()->limit(20)->columnSpanFull();

// Models without LogsActivity: log AlfaKit's create, edit and delete actions…
ActivityLogPlugin::make()->logActions();

// …and resource create / edit pages.
class EditInvoice extends EditRecord
{
    use LogsAlfakitActions;
}

On panels with tenancy the log only lists the current tenant's activities (scopeToTenant(), scopeToTenantUsing(), recordTenant()).

See the documentation for every option.

License

MIT. See LICENSE.md.