Skip to content

Commit

Permalink
Merge pull request #637 from chengkangzai/patch-1
Browse files Browse the repository at this point in the history
Update creating-a-cast.md
  • Loading branch information
freekmurze authored Jan 12, 2024
2 parents bf20659 + 5e45eec commit d7d90c6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/advanced-usage/creating-a-cast.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ You may want to allow your application's value objects to define their own custo

```php
class ForgotPasswordRequest extends Data
{
public function __construct(
#[WithCastable(Email::class)]
public Email $email,
Expand All @@ -40,6 +41,7 @@ When using `Castable` classes, you may still provide arguments in the `WithCasta

```php
class DuplicateEmailCheck extends Data
{
public function __construct(
#[WithCastable(Email::class, normalize: true)]
public Email $email,
Expand Down

0 comments on commit d7d90c6

Please sign in to comment.