Apply fixes from StyleCI

This commit is contained in:
Manish Verma
2018-08-06 05:18:13 +00:00
committed by StyleCI Bot
parent 4ec6000d69
commit c547b2e438
41 changed files with 373 additions and 308 deletions

View File

@@ -45,17 +45,18 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
$pic = $this->checkArray('avatar', $info);
}
if (!$pic && $value) {
$pic = "";
$file = asset('uploads/profilepic/' . $value);
$pic = '';
$file = asset('uploads/profilepic/'.$value);
if ($file) {
$type = pathinfo($file, PATHINFO_EXTENSION);
$data = file_get_contents($file);
$pic = 'data:image/' . $type . ';base64,' . base64_encode($data);
$pic = 'data:image/'.$type.';base64,'.base64_encode($data);
}
}
if (!$value) {
$pic = \Gravatar::src($this->attributes['email']);
}
return $pic;
}