Skip to content

Commit

Permalink
Fix wrong method used in lazy-properties.md documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Defrothew authored Jan 14, 2024
1 parent d7d90c6 commit 8590796
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 8590796

Please sign in to comment.