Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

Latest commit

 

History

History
22 lines (16 loc) · 561 Bytes

model-setup.md

File metadata and controls

22 lines (16 loc) · 561 Bytes

Model Setup

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.