composer require bfg/admin-audit
php artisan admin:extension bfg/admin-audit --install
For more information on how to use the package, please refer to our official documentation available on laravel-auditing.com or in the repository documentation file. Our documentation provides detailed instructions on how to install and use the package, as well as examples and best practices for auditing in Laravel applications.
php artisan vendor:publish --provider "OwenIt\Auditing\AuditingServiceProvider" --tag="config"
php artisan vendor:publish --provider "OwenIt\Auditing\AuditingServiceProvider" --tag="migrations"
php artisan migrate
Open configs/audit.php
and enable console
config:
...
/*
|--------------------------------------------------------------------------
| Audit Console
|--------------------------------------------------------------------------
|
| Whether console events should be audited (eg. php artisan db:seed).
|
*/
'console' => true,
...
Add implement
use OwenIt\Auditing\Contracts\Auditable;
...
class User extends Authenticatable implements Auditable
{
use \OwenIt\Auditing\Auditable;
...
}