modera/backend-tools-activity-log-bundle
Activity log bundle for Modera backend tools: records user actions and model changes, provides an audit trail, and integrates logging into admin workflows. Helps teams track who changed what and when in Laravel/PHP applications.
composer require this into a Laravel app. Despite being on Packagist, this is a Symfony bundle from 2016 (PHP 5.x/early 7.x, Symfony 2.x/3.x era). There is no service provider, no publishable config/*.php, no Blade views, no Artisan commands. Installing it pulls a Symfony bundle chain (ModeraActivityLoggerBundle → Modera backend/foundation bundles) that will fight your Laravel dependency constraints before you write a line of code.activities table needs (actor, action, subject type, subject id, payload, occurred_at).id, actor_id (FK users), action (string, e.g. created|updated|deleted), subject_type (string/class), subject_id, payload (json, old→new values), ip, user_agent, occurred_at. Copy the fields from the bundle; ignore the Doctrine mapping details.// App\Observers\AuditableObserver
public function updated(Model $model) {
Activity::create([
'actor_id' => auth()->id(),
'action' => 'updated',
'subject_type' => get_class($model),
'subject_id' => $model->getKey(),
'payload' => ['changes' => $model->getChanges()],
]);
}
Route::middleware(['web','auth','can:view-activity-log'])
->prefix('admin/activity-log')
->group(function () {
Route::get('/', [ActivityLogController::class,'index'])->name('activity.index');
Route::get('/{activity}', [ActivityLogController::class,'show'])->name('activity.show');
});
scopeForActor, scopeForAction, scopeBetween, scopeForSubject.view-activity-log gate; the bundle's admin-only assumption maps trivially onto a Laravel ability check.cursorPaginate() and index (actor_id, occurred_at), (subject_type, subject_id, occurred_at), and (action, occurred_at).spatie/laravel-activitylog + a small custom admin panel is the modern Laravel equivalent — it covers the same logging surface this bundle did.ModeraActivityLoggerBundle underneath, and that bundle carries its own Symfony/Doctrine assumptions. Reading it in isolation gives you requirements, not a working system.payload indexing, tenant scoping, soft retention, and immutability decisions consciously — changing an audit schema after millions of rows is painful.[READ-ONLY] mirror, 0 stars, 0 dependents. No security patches, no upstream. Never adopt this in the critical path.payload presenter.How can I help you explore Laravel packages today?