misaf / vendra-activity-log
Installs: 0
Dependents: 3
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:vendra-module
pkg:composer/misaf/vendra-activity-log
Requires
- php: ^8.2
- awcodes/filament-badgeable-column: ^3.0
- filament/filament: ^4.7.0
- illuminate/support: ^11.0|^12.0
- misaf/vendra-tenant: ^12.0
- misaf/vendra-user: ^12.0
- mokhosh/filament-jalali: ^5.1
- spatie/laravel-package-tools: ^1.92
Requires (Dev)
- larastan/larastan: ^3.9.2
- laravel/boost: ^2.0.6
- laravel/pint: ^1.27
- mockery/mockery: ^1.6.12
- nunomaduro/collision: ^8.8.3
- orchestra/testbench: ^10.9
- pestphp/pest: ^4.3.2
- pestphp/pest-plugin-arch: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
- pestphp/pest-plugin-profanity: ^4.2.1
- pestphp/pest-plugin-type-coverage: ^4.0.3
This package is auto-updated.
Last update: 2026-02-11 12:32:12 UTC
README
A Laravel Filament module for tenant-aware activity logging. It extends Spatie Laravel Activitylog, adds multi-tenancy support, and integrates an Activity Log resource into the Vendra admin panel.
Table of contents
Requirements
- PHP 8.3+
- Laravel 11 or 12
- Filament (admin panel; plugin registers on the
adminpanel only) - misaf/vendra-user ^12.0
- misaf/vendra-tenant ^12.0
- spatie/laravel-activitylog (install and run its migrations in your app first)
- mokhosh/filament-jalali ^5.1
Installation
-
Install the package (ensure
spatie/laravel-activitylogis already installed and migrated):composer require misaf/vendra-activity-log
-
Publish and run migrations – First publish Spatie’s activity log table, then this package’s migration (adds
tenant_id):php artisan vendor:publish --tag=activitylog-migrations php artisan vendor:publish --tag=vendra-activity-log-migrations php artisan migrate
-
(Optional) Publish language files:
php artisan vendor:publish --tag=vendra-activity-log-lang
The plugin is automatically registered on the Filament admin panel. No manual registration is required.
Configuration
Activity log behavior is controlled by config/activitylog.php (from Spatie’s package). This module provides a tenant-aware model that you must set as the activity model:
// config/activitylog.php return [ // ... 'activity_model' => \Misaf\VendraActivityLog\Models\ActivityLog::class, ];
If you don’t have this config yet, publish it from Spatie:
php artisan vendor:publish --provider="Spatie\Activitylog\ActivitylogServiceProvider" --tag="activitylog-config"
Features
- Tenant-aware logging – The
ActivityLogmodel usesBelongsToTenantfrom vendra-tenant; all activities are scoped by tenant. - Filament admin UI – Activity Log resource with list and view pages, under Report Management → Activity Logs.
- Translations – Publishable translation files for multiple languages.
- Migrations – Adds
tenant_id(and index) to the activity log table for multi-tenancy.
Usage
Use Spatie’s activity log API as usual. Activities are stored with the current tenant and appear in the admin panel under Report Management → Activity Logs.
Example:
activity() ->causedBy(auth()->user()) ->performedOn($someModel) ->withProperties(['key' => 'value']) ->log('Did something');
See Spatie’s documentation for logging on models, batches, and more.
Testing
composer test
Or with PHPUnit:
vendor/bin/pest
License
MIT. See LICENSE.