Skip to content

Commit 6386325

Browse files
committed
Merge branch 'master' of github.com:GeneaLabs/laravel-model-caching
2 parents e5a9fea + 2bfc7f0 commit 6386325

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ There are two methods by which model-caching can be disabled:
157157
3. If you only need to disable the cache for a block of code, or for non-
158158
eloquent queries, this is probably the better option:
159159
```php
160-
app("model-cache")->runDisabled(function () {
161-
// your code here, it may return, as well
160+
$result = app("model-cache")->runDisabled(function () {
161+
return (new MyModel)->get(); // or any other stuff you need to run with model-caching disabled
162162
});
163163
```
164164

0 commit comments

Comments
 (0)