FEATURE: move bussiness logic out of models
This commit is contained in:
@@ -22,7 +22,6 @@ class User extends Model implements AuthenticableInterface
|
||||
'password',
|
||||
'name',
|
||||
];
|
||||
protected $guarded = [];
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
@@ -38,18 +37,4 @@ class User extends Model implements AuthenticableInterface
|
||||
const ROLE_VISITOR = 'visitor';
|
||||
const ROLE_EDITOR = 'editor';
|
||||
const ROLE_ADMIN = 'admin';
|
||||
|
||||
/**
|
||||
* Getter for Gravatar URL
|
||||
*
|
||||
* This method returns full path (url) to user's Gravatar. It accepts optional parameter for setting size.
|
||||
*
|
||||
* @param int $size size of rendered gravatar
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function gravatar($size = 50)
|
||||
{
|
||||
return Gravatar::img($this->email, $size);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user