'array', 'new_values' => 'array', 'created_at' => 'datetime', ]; protected static function booting(): void { static::creating(function (self $model) { $model->created_at = now(); }); } public function causer() { return match ($this->causer_type) { 'admin' => $this->belongsTo(User::class, 'causer_id'), 'customer' => $this->belongsTo(Customer::class, 'causer_id'), default => null, }; } }