I am using Laravel 5.4 and Laravel Auditing 4.1. I want to record the price changes on Variant model, I installed the Auditing 4.1 package. See my code,
config/audit.php
'implementation' => OwenIt\Auditing\Models\Audit::class,
'user' => [
'primary_key' => 'id',
'foreign_key' => 'variant_id',
'model' => App\Variant::class,
'resolver' => App\Variant::class,
],
app/Models/Variant.php
use OwenIt\Auditing\Auditable;
use OwenIt\Auditing\Contracts\Auditable as AuditableContract;
class Variant extends BaseModel implements AuditableContract{
use Auditable;
--------Code here----------------
}
Using this code when I try to insert data to database, This error will come,
UnexpectedValueException
Invalid User resolver, callable or UserResolver FQCN expected
How can I fix this error and record my changes on audits
table?