Clear prize cache when updating instant win
This commit is contained in:
parent
816bab3cb3
commit
ec8b4ffba5
2 changed files with 14 additions and 5 deletions
|
|
@ -41,9 +41,18 @@ class InstantWin extends Model
|
|||
*/
|
||||
protected static function booted()
|
||||
{
|
||||
static::creating(fn () => self::removeCached());
|
||||
static::updating(fn () => self::removeCached());
|
||||
static::deleting(fn () => self::removeCached());
|
||||
static::creating(function () {
|
||||
InstantWin::removeCached();
|
||||
Prize::removeCached();
|
||||
});
|
||||
static::updating(function () {
|
||||
InstantWin::removeCached();
|
||||
Prize::removeCached();
|
||||
});
|
||||
static::deleting(function () {
|
||||
InstantWin::removeCached();
|
||||
Prize::removeCached();
|
||||
});
|
||||
}
|
||||
|
||||
// * RELATIONSHIPS
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "uwil/gen-game-web",
|
||||
"version": "2.2.5",
|
||||
"version": "2.2.6",
|
||||
"type": "project",
|
||||
"description": "Game generator",
|
||||
"support": {
|
||||
|
|
@ -103,4 +103,4 @@
|
|||
},
|
||||
"minimum-stability": "stable",
|
||||
"prefer-stable": true
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue