Update Profile model, use change_count for version

This commit is contained in:
Daniel Supernault 2020-03-30 19:34:27 -06:00
parent e6190b896b
commit 0eae9f8b78
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 1 additions and 2 deletions

View File

@ -137,8 +137,7 @@ class Profile extends Model
$url = Cache::remember('avatar:'.$this->id, now()->addYears(1), function () {
$avatar = $this->avatar;
$path = $avatar->media_path;
$version = hash('sha256', $avatar->change_count);
$path = "{$path}?v={$version}";
$path = "{$path}?v={$avatar->change_count}";
return config('app.url') . Storage::url($path);
});