FEATURE: move bussiness logic out of models

This commit is contained in:
Michal Kváček
2016-10-17 01:05:20 +02:00
parent 2ded2924a1
commit e26e6fd460
46 changed files with 1069 additions and 1039 deletions
-15
View File
@@ -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);
}
}