We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7533fbe commit db51a86Copy full SHA for db51a86
src/CachedModel.php
@@ -26,15 +26,6 @@ public function newEloquentBuilder($query)
26
return new Builder($query);
27
}
28
29
- public static function boot()
30
- {
31
- parent::boot();
32
-
33
- static::saved(function ($instance) {
34
- $instance->flushCache();
35
- });
36
- }
37
38
public static function all($columns = ['*'])
39
{
40
$class = get_called_class();
src/Traits/Cachable.php
@@ -60,4 +60,11 @@ protected function makeCacheTags() : array
60
return (new CacheTags($this->eagerLoad, $this->model))
61
->make();
62
63
+
64
+ public static function bootCachable()
65
+ {
66
+ static::saved(function ($instance) {
67
+ $instance->flushCache();
68
+ });
69
+ }
70
0 commit comments