fix arrays
This commit is contained in:
@@ -35,10 +35,7 @@ class Gallery extends Model
|
||||
parent::boot();
|
||||
|
||||
$clearCache = function ($gallery) {
|
||||
$cacheKeys = [
|
||||
"gallery:{$gallery->id}:media",
|
||||
];
|
||||
Cache::forget($cacheKeys);
|
||||
Cache::forget("gallery:{$gallery->id}:media");
|
||||
};
|
||||
|
||||
static::saving($clearCache);
|
||||
|
||||
@@ -110,10 +110,7 @@ class Media extends Model
|
||||
parent::boot();
|
||||
|
||||
$clearCache = function ($media) {
|
||||
$cacheKeys = [
|
||||
"media:{$media->id}",
|
||||
];
|
||||
Cache::forget($cacheKeys);
|
||||
Cache::forget("media:{$media->id}");
|
||||
};
|
||||
|
||||
static::updating(function ($media) use ($clearCache) {
|
||||
|
||||
@@ -90,11 +90,10 @@ class User extends Authenticatable implements Auditable
|
||||
parent::boot();
|
||||
|
||||
$clearCache = function ($user) {
|
||||
$cacheKeys = [
|
||||
Cache::forget(
|
||||
"user:{$user->id}",
|
||||
"user:{$user->id}:permissions",
|
||||
];
|
||||
Cache::forget($cacheKeys);
|
||||
"user:{$user->id}:permissions"
|
||||
);
|
||||
};
|
||||
|
||||
static::saving($clearCache);
|
||||
|
||||
Reference in New Issue
Block a user