Overview
Trail helps you keep track of who did what and when in your application. It automatically records model events and allows for custom logging of critical user actions, providing a complete audit history.
Key Features
- Automatic Eloquent model event logging (created, updated, deleted)
- Tracks changed attributes (old vs new values)
- User attribution for all actions
- IP address and User Agent logging
Basic Usage
use Obelaw\Trail\Traits\LogsActivity;
class Post extends Model
{
use LogsActivity;
// Customize what to log
protected static $logAttributes = ['title', 'content'];
}