Skip to content

Commit

Permalink
Merge pull request #30 from gisostallenberg/patch-1
Browse files Browse the repository at this point in the history
Make first example use the same alias
  • Loading branch information
tpetry authored Jan 10, 2025
2 parents 7e52d18 + 70a952d commit 1ca6dca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ User::query()
->when(isMySQL(), fn ($query) => $query->selectRaw('coalesce(`user`, `admin`) AS `value`'))

// You can use:
User::select(new Alias(new Coalesce(['user', 'admin']), 'count'));
User::select(new Alias(new Coalesce(['user', 'admin']), 'value'));
```

And you can also create new powerful queries:
Expand Down

0 comments on commit 1ca6dca

Please sign in to comment.