Skip to content

Commit db9d936

Browse files
committed
Updated readme file to include computed attribute in example
1 parent 35fed56 commit db9d936

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ Then you can define the properties of the class and their types.
1313

1414
```php
1515
use Nuxtifyts\PhpDto\Data;
16+
use Nuxtifyts\PhpDto\Attributes\PropertyAttributes\Computed;
1617

1718
final readonly class UserData extends Data
1819
{
20+
#[Computed]
1921
public string $fullName;
2022

2123
public function __construct(
@@ -33,7 +35,6 @@ You can then create an instance of the class from a mixed value. The DTO will th
3335
$data = [
3436
'firstName' => 'John',
3537
'lastName' => 'Doe',
36-
'fullName' => 'John Doe'
3738
];
3839

3940
$user = UserData::from($data);

0 commit comments

Comments
 (0)