Skip to content

Introduction

Laravel Auditable is a simple auditing package for your Eloquent models. This package automatically inserts or updates an audit log on your table to track who created and last updated records.

Features

  • Automatic Tracking: Automatically records the user who created and last updated each record
  • Soft Delete Support: Optional trait for tracking who deleted records
  • Customizable Columns: Define custom column names using constants
  • Customizable User Model: Configure a different user class per model
  • Blueprint Macros: Schema builder macros for adding auditable fields
  • Laravel 13 Compatible: Built for Laravel 13 with PHP 8.3+ support

Feature Comparison

Feature AuditableTrait AuditableWithDeletesTrait
Tracks created_by
Tracks updated_by
Tracks deleted_by
Requires SoftDeletes
Package Size Lightweight Lightweight

::: tip Choosing a Trait

  • Use AuditableTrait for basic audit tracking (create/update)
  • Use AuditableWithDeletesTrait when you need to track who deleted records :::

Credits