jrmypttrsn

TypeError: Argument 1 passed to OwenIt\Auditing\AuditableObserver::retrieved

laravel Icon

TypeError

Argument 1 passed to OwenIt\Auditing\AuditableObserver::retrieved() must be an instance of OwenIt\Auditing\Contracts\Auditable, instance of App\Address given, called in /vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php on line 412

An unhandled exception occurred on line 24
21
     *
22
     * @return void
23
     */
24
    public function retrieved(Auditable $model)
25
    {
26
        Auditor::execute($model->setAuditEvent('retrieved'));

Solution

Properly called the audit from the model.            
Apr 13, 2021 Anyone

0 replies


Install the browser extension

Found this solution helpful? Try our extension for quick solutions to your Laravel errors.

Chrome logo Add to Chrome - It's free