Skip to content

Commit

Permalink
Update creating-a-data-object.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenvanassche authored Sep 15, 2023
1 parent ac9baf2 commit b2f06dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/as-a-data-transfer-object/creating-a-data-object.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ SongData::from(Song::firstOrFail($id));
Data can also be created from JSON strings:

```php
SongData::from('{"name" : "Never Gonna Give You Up","artist" : "Rick Astley"}');
SongData::from('{"title" : "Never Gonna Give You Up","artist" : "Rick Astley"}');
```

The package will find the required properties within the model and use them to construct the data object.
Expand Down

0 comments on commit b2f06dd

Please sign in to comment.