Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Activity Log

Activity Log Laravel Package

escarter/activity-log

A lightweight Laravel package for tracking user activity. Log model events and custom actions to the database, then query recent activity to build audit trails, dashboards, or admin feeds with minimal configuration. Works with Eloquent models and is simple to install and extend.

View on GitHub
Deep Wiki
Context7

escarter/activity-log is a lightweight Laravel package for keeping an audit trail of activity in your application. It hooks into model events and user actions, storing each entry in a queryable log so you can see who changed what, and when—without building a full auditing system from scratch.

  • Captures created, updated, and deleted model events automatically
  • Records the authenticated user and request context with each entry
  • Ships with an Eloquent model for querying and filtering history
  • Configurable logging targets and per-model opt-out
  • Drop-in service provider with publishable configuration
Frequently asked questions about Activity Log
What is escarter/activity-log used for in a Laravel application?
It is a lightweight Laravel package for recording user activities and model events so you can build audit trails and track changes across your application. It focuses on simple integration and customizable logging rather than a large feature surface. Developers typically use it when they want a clean way to monitor actions taken by users or changes made to Eloquent models.
How do I install escarter/activity-log with Composer?
Require the package through Composer using the escarter/activity-log name, then follow the setup steps documented in the repository README. As with most Laravel packages, installation may also involve publishing configuration or migration assets and, on older Laravel versions without package discovery, registering a service provider. Always check the README for the exact commands for your Laravel version.
Which Laravel versions does escarter/activity-log support?
The supported range is defined by the package's composer.json constraints rather than by its one-line description. Check the require section on Packagist or GitHub and confirm it matches the Laravel and PHP versions your project runs. If you are on an older release or the newest major version, verify compatibility before adding it to a production app.
How does it log model events like created, updated, and deleted?
The package records model events, which is what lets you capture creates, updates, and deletes as part of an audit trail. Instead of writing logging calls by hand in every controller, you let the package observe Eloquent activity and store the resulting entries. See the README for the exact trait or model configuration needed to opt a model into logging.
Can I customize what escarter/activity-log records?
Customizable logging is one of the stated goals of the package, so you can shape what gets recorded instead of accepting a fixed format. Typical adjustments involve choosing which models or events are captured and how each entry is described. The README is the authoritative source for the available configuration options and defaults.
Can I record activities manually, without relying on model events?
The package is described as recording both user activities and model events, which suggests you can log actions that are not tied to an Eloquent lifecycle event. This is useful for things like logins, exports, or failed attempts that a model observer would never see. Check the README for the exact helper, facade call, or service you should use.
Does it track which authenticated user performed an action?
Because the package targets user activity and audit trails, entries are typically associated with the authenticated user responsible for the action. In a standard Laravel app that means the record resolves the currently logged-in user through the framework's auth guard. Confirm in the README whether the user relationship and resolver are configurable for multi-guard or API-only setups.
Is escarter/activity-log suitable for production audit trails?
It can be, provided you plan for volume, since activity tables grow quickly in busy applications and you should index the columns you filter on and consider pruning or archiving old entries. Decide whether writes should occur inside the same transaction as the change being logged, because that affects consistency and failure behavior. Review the package's migration and configuration before relying on it for compliance-grade auditing.
How do I test that activity logging works in my Laravel test suite?
Assert against the activity records your application creates using normal Laravel testing tools, such as database assertions against the package's table. If the package exposes a model or dispatches events, you can also use Laravel's event fakes alongside database assertions in feature tests. Wrap the tests in RefreshDatabase so the activity table is migrated cleanly on every run.
How does escarter/activity-log compare to spatie/laravel-activitylog?
spatie/laravel-activitylog is the most widely adopted package in this space, with a broader feature set and a much larger community. escarter/activity-log positions itself as a lightweight alternative emphasizing simple integration and customizable logging, which can suit smaller projects that do not want heavier dependencies. Compare maintenance activity, Laravel version support, and schema flexibility of both before committing.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections