Skip to content

Commit

Permalink
Merge pull request #639 from Defrothew/patch-1
Browse files Browse the repository at this point in the history
Fix wrong method used in lazy-properties.md documentation
  • Loading branch information
rubenvanassche authored Jan 15, 2024
2 parents d7d90c6 + 8590796 commit 324970e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/as-a-resource/lazy-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ You can also use the values of the data object in such condition:
AlbumData::from(Album::first())->includeWhen('songs', fn(AlbumData $data) => count($data->songs) > 0);
AlbumData::from(Album::first())->excludeWhen('songs', fn(AlbumData $data) => count($data->songs) > 0);
AlbumData::from(Album::first())->onlyWhen('songs', fn(AlbumData $data) => count($data->songs) > 0);
AlbumData::from(Album::first())->except('songs', fn(AlbumData $data) => count($data->songs) > 0);
AlbumData::from(Album::first())->exceptWhen('songs', fn(AlbumData $data) => count($data->songs) > 0);
```

In some cases you may want to define an include on a class level by implementing a method:
Expand Down

0 comments on commit 324970e

Please sign in to comment.