Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Added php syntax highlighting #527

Merged
merged 1 commit into from
Jan 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/basic-usage/retrieving-tagged-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ YourModel::withAnyTags(['tag 1', 'tag 2'], 'myType')->get();

The `withAllTags` scope will return only the models that have all of the given tags attached to them. If you pass the `type` argument, it will look for tags with specified type, if not, it will only look for tags that have no type. So when passing a non-existing tag, or a correct tag name with the wrong type, no models will be returned.

```
```php
//returns models that have all given tags that are not saved with a type
YourModel::withAllTags(['tag 1', 'tag 2'])->get();

Expand All @@ -42,7 +42,7 @@ YourModel::withAnyTagsOfAnyType(['tag 1', 'tag 2'])->get();

The `withAllTagsOfAnyType` scope will return only the models that have all of the given tags attached to them, but doesn't restrict given tags to any type if they are passed as `string`. So when passing a non-existing tag no models will be returned.

```
```php
//returns models that have all given tags of any type
YourModel::withAllTagsOfAnyType(['tag 1', 'tag 2'])->get();
```
Loading