Installation
Install Laravel Audit Logs and publish its configuration and migrations.
Requirements
Laravel Audit Logs requires PHP 8.4 or later and Laravel 12 or 13.
Install the package
Install the package with Composer:
composer require hosmelq/laravel-audit-logsRun the installer to publish the configuration file and migrations:
php artisan audit-log:installThe installer offers to run the migrations. If you skip that step, run them yourself:
php artisan migrateThe package publishes two migrations. The first creates the audit log table, and the second adds the attribute_changes column used for attribute changes. Run both.
Publish manually
To publish the files without the installer, run:
php artisan vendor:publish --tag="audit-log-config"
php artisan vendor:publish --tag="audit-log-migrations"
php artisan migrateThe migrations read audit-log.storage.connection and audit-log.storage.table. Set those options before migrating if logs should not use the default connection or the audit_logs table. See configuration.
Next steps
Review the configuration, then record your first audit log.