*/ public function toArray(Request $request): array { return [ 'id' => $this->id, 'admin_id' => $this->admin_id, 'target_user_id' => $this->target_user_id, 'target_user' => new AdminUserResource($this->whenLoaded('targetUser')), 'reason' => $this->reason, 'mfa_method' => $this->mfa_method, 'started_at' => $this->started_at?->toIso8601String(), 'expires_at' => $this->expires_at?->toIso8601String(), 'ended_at' => $this->ended_at?->toIso8601String(), 'end_reason' => $this->end_reason, 'actions_count' => $this->actions_count, ]; } }