Make sure user and acars data is sent from API

This commit is contained in:
Nabeel Shahzad
2020-03-29 13:33:14 -04:00
parent 82b873c071
commit e9b30fbe30
8 changed files with 46 additions and 24 deletions

View File

@@ -170,6 +170,16 @@ class User extends Authenticatable
return $uri;
}
public function resolveAvatarUrl()
{
$avatar = $this->getAvatarAttribute();
if (empty($avatar)) {
return $this->gravatar();
} else {
return $avatar->url;
}
}
/**
* Foreign Keys
*/