ReviewEvent::class]; } /** * @return MorphTo */ public function reviewable(): MorphTo { return $this->morphTo(); } /** * @return BelongsTo */ public function user(): BelongsTo { return $this->belongsTo(User::class); } /** * The live name when the account is at hand — people rename themselves — * and the recorded one otherwise, including once the account is gone. */ public function author(): string { if ($this->relationLoaded('user') && $this->user !== null) { return $this->user->name; } return $this->user_name ?? __('panel.revisions.system'); } }