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 b49e122 commit 1d5fa82Copy full SHA for 1d5fa82
src/CachedModel.php
@@ -30,22 +30,19 @@ public static function boot()
30
{
31
parent::boot();
32
33
- $class = get_called_class();
34
- $instance = new $class;
35
-
36
- static::created(function () use ($instance) {
+ static::created(function ($instance) {
37
$instance->flushCache();
38
});
39
40
- static::deleted(function () use ($instance) {
+ static::deleted(function ($instance) {
41
42
43
44
- static::saved(function () use ($instance) {
+ static::saved(function ($instance) {
45
46
47
48
- static::updated(function () use ($instance) {
+ static::updated(function ($instance) {
49
50
51
}
0 commit comments