Convert string references to ::class
PHP 5.5.9 adds the new static `class` property which provides the fully qualified class name. This is preferred over using strings for class names since the `class` property references are checked by PHP.
This commit is contained in:
@@ -63,7 +63,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
|
||||
|
||||
public function avatar()
|
||||
{
|
||||
$related = 'App\UserAdditionalInfo';
|
||||
$related = \App\UserAdditionalInfo::class;
|
||||
$foreignKey = 'owner';
|
||||
|
||||
return $this->hasMany($related, $foreignKey)->select('value')->where('key', 'avatar')->first();
|
||||
@@ -71,7 +71,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
|
||||
|
||||
public function getOrganizationRelation()
|
||||
{
|
||||
$related = "App\Model\helpdesk\Agent_panel\User_org";
|
||||
$related = \App\Model\helpdesk\Agent_panel\User_org::class;
|
||||
$user_relation = $this->hasMany($related, 'user_id');
|
||||
$relation = $user_relation->first();
|
||||
if ($relation) {
|
||||
|
Reference in New Issue
Block a user