This commit is contained in:
shibafu
2019-01-15 00:05:01 +09:00
parent a2f797cbbe
commit faf0755ebd
44 changed files with 87 additions and 68 deletions

View File

@@ -2,8 +2,8 @@
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Support\Facades\Auth;
class User extends Authenticatable
@@ -36,9 +36,10 @@ class User extends Authenticatable
* @param int $size 画像サイズ
* @return string Gravatar 画像URL
*/
public function getProfileImageUrl($size = 30) : string
public function getProfileImageUrl($size = 30): string
{
$hash = md5(strtolower(trim($this->email)));
return '//www.gravatar.com/avatar/' . $hash . '?s=' . $size;
}