some sample users and gravatar lookup

This commit is contained in:
Nabeel Shahzad
2017-08-10 18:21:24 -05:00
parent 1a532a9082
commit f46f87567c
3 changed files with 37 additions and 1 deletions

View File

@@ -86,6 +86,14 @@ class User extends Authenticatable
return $this->airline->code.str_pad($this->id, 3, '0', STR_PAD_LEFT);
}
public function gravatar()
{
$size = 80;
$default = 'https://en.gravatar.com/userimage/12856995/7c7c1da6387853fea65ff74983055386.png';
return "https://www.gravatar.com/avatar/" .
md5( strtolower( trim( $this->email) ) ) . "?d=" . urlencode( $default ) . "&s=" . $size;
}
/**
* Foreign Keys
*/