belongsTo(User::class, 'enhancer_id', 'id'); } public function classification() { return $this->belongsTo(ContentRecapClassification::class, 'classification_id', 'id'); } public function getActivitylogOptions(): LogOptions { return LogOptions::defaults() ->logOnly([ 'content_theme', 'posted_date', 'channel', 'link', 'classification_id', 'social_media', 'image', 'content_type', 'description', 'enhancer_id', ]) // kolom yang dicatat ->useLogName('content_recap') // nama log ->logOnlyDirty(); // hanya log kalau ada perubahan } public function getDescriptionForEvent(string $eventName): string { switch ($eventName) { case 'created': $eventName = 'dibuat'; break; case 'updated': $eventName = 'diubah'; break; case 'deleted': $eventName = 'dihapus'; break; } return "Rekap Konten '{$this->content_theme}' telah {$eventName}"; } }