修复 无法更新任务的问题

This commit is contained in:
iVampireSP.com 2022-09-11 20:44:43 +08:00
parent 027c6b44d7
commit 7a842ca894
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -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);
}); });
} }
} }