1
0
Fork 0

Update AvatarController

This commit is contained in:
Daniel Supernault 2018-11-26 23:53:26 -07:00
parent 2d773ca537
commit 3cbe367869
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ class AvatarController extends Controller
$path = $this->buildPath($id); $path = $this->buildPath($id);
$dir = storage_path('app/'.$path); $dir = storage_path('app/'.$path);
$this->checkDir($dir); $this->checkDir($dir);
$name = 'avatar.'.$file->guessExtension(); $name = str_random(20).'_avatar.'.$file->guessExtension();
$res = ['root' => 'storage/app/'.$path, 'name' => $name, 'storage' => $path]; $res = ['root' => 'storage/app/'.$path, 'name' => $name, 'storage' => $path];
return $res; return $res;