Projectslaravel-audit-logsInstallation

Laravel Audit Logs

Package

Audit logging for Eloquent models and auth events in Laravel.

Installation

Requirements

  • PHP 8.3+
  • Laravel 13+

Install

composer require bradietilley/laravel-audit-logs

The service provider is auto-discovered.

Publish assets

php artisan vendor:publish --tag="audit-logs-migrations"
php artisan vendor:publish --tag="audit-logs-config"
php artisan migrate

Optional log channel

By default audit-logs.log_channel is null — logs are persisted to the database only. To also write to a Laravel log stream, define a channel and point the config at it:

// config/logging.php
'channels' => [
    'audit_logs' => [
        'driver' => 'single',
        'path' => storage_path('logs/audit-logs.log'),
        'level' => 'info',
    ],
],
// config/audit-logs.php
'log_channel' => 'audit_logs',

Next steps