변환된 배열 데이터 */ public function toArray(Request $request): array { return [ 'id' => $this->id, 'product_id' => $this->product_id, 'product_name' => $this->product?->getLocalizedName() ?? '', 'rating' => (int) $this->rating, 'author_name' => $this->user?->name ?? '', 'created_at' => $this->formatDateTimeStringForUser($this->created_at), ]; } }