<?php


namespace App\Traits;


use App\Events\ModelChangedEvent;

trait ModelLogChanging
{
    public function __construct(array $attributes = [])
    {
        $this->dispatchesEvents = [
            'created' => ModelChangedEvent::class,
            'updated' => ModelChangedEvent::class,
            'restored' => ModelChangedEvent::class,
            'saved' => ModelChangedEvent::class,
            'deleted' => ModelChangedEvent::class,
        ];
        parent::__construct($attributes);
    }

}
