From 8590796c34fbddfab900d5e75a17ae4f566b4414 Mon Sep 17 00:00:00 2001 From: Defrothew Date: Sun, 14 Jan 2024 15:46:16 +0800 Subject: [PATCH] Fix wrong method used in lazy-properties.md documentation --- docs/as-a-resource/lazy-properties.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/as-a-resource/lazy-properties.md b/docs/as-a-resource/lazy-properties.md index 32b7bf2a..f916844a 100644 --- a/docs/as-a-resource/lazy-properties.md +++ b/docs/as-a-resource/lazy-properties.md @@ -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: