grant medal clear user cache

This commit is contained in:
xiaomlove
2022-08-11 19:27:50 +08:00
parent 46d8e3d951
commit e72d2fba78

View File

@@ -70,6 +70,7 @@ class MedalRepository extends BaseRepository
if ($duration > 0) {
$expireAt = Carbon::now()->addDays($duration)->toDateTimeString();
}
clear_user_cache($uid);
return $user->medals()->attach([$medal->id => ['expire_at' => $expireAt, 'status' => UserMedal::STATUS_NOT_WEARING]]);
}