Setting up a model for auditing could not be simpler.
Just use the OwenIt\Auditing\Auditable
trait in the model you wish to audit and implement the OwenIt\Auditing\Contracts\Auditable
interface.
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use OwenIt\Auditing\Contracts\Auditable;
class User extends Model implements Auditable
{
use \OwenIt\Auditing\Auditable;
// ...
}
By default, the Database
audit driver will be used.
If needed, you can also implement your own Audit Driver.