Skip to content

Commit

Permalink
Add a ->first() as requested for scopeMetaLike().
Browse files Browse the repository at this point in the history
  • Loading branch information
bluehaoran authored Nov 27, 2018
1 parent 108d63c commit a8b879c
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 @@ -264,7 +264,7 @@ There are multiples possibilities to query posts by their custom fields (meta) b
To check if a meta key exists, use the `hasMeta()` scope:
```
// Finds a published post with a meta flag.
$post = Post::published()->hasMeta('featured_article');
$post = Post::published()->hasMeta('featured_article')->first();
```

If you want to precisely match a meta-field, you can use the `hasMeta()` scope with a value.
Expand Down

0 comments on commit a8b879c

Please sign in to comment.