修复 无法更新任务的问题
This commit is contained in:
parent
027c6b44d7
commit
7a842ca894
@ -82,7 +82,7 @@ protected static function boot()
|
|||||||
|
|
||||||
$model->user_id = $model->host->user_id;
|
$model->user_id = $model->host->user_id;
|
||||||
|
|
||||||
Cache::forget('user_tasks_' . auth()->id());
|
Cache::forget('user_tasks_' . $model->user_id);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -94,13 +94,13 @@ protected static function boot()
|
|||||||
});
|
});
|
||||||
|
|
||||||
// updated and delete
|
// updated and delete
|
||||||
static::updated(function () {
|
static::updated(function ($model) {
|
||||||
Cache::forget('user_tasks_' . auth()->id());
|
Cache::forget('user_tasks_' . $model->user_id);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
static::deleted(function () {
|
static::deleted(function ($model) {
|
||||||
Cache::forget('user_tasks_' . auth()->id());
|
Cache::forget('user_tasks_' . $model->user_id);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user