Skip to content

Commit

Permalink
Merge pull request #12 from IBEC-BOX/feat/add-single-route
Browse files Browse the repository at this point in the history
fix: add id
  • Loading branch information
ast21 authored Dec 31, 2024
2 parents 1757aec + 2f41d38 commit ee7c5be
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/UI/API/DTO/ProductDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class ProductDTO extends Data
use WithDeprecatedCollectionMethod;

public function __construct(
public int $id,
public string $title,
public ?string $text,
public ?string $short_text,
Expand All @@ -23,6 +24,7 @@ public function __construct(
public static function fromModel(Product $product): ProductDTO
{
return new self(
id: $product->id,
title: $product->title,
text: $product->text,
short_text: $product->short_text,
Expand Down

0 comments on commit ee7c5be

Please sign in to comment.