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:
@@ -15,7 +15,7 @@ class UserNotification extends BaseModel
|
||||
|
||||
public function notification()
|
||||
{
|
||||
$related = 'App\Model\helpdesk\Notification\Notification';
|
||||
$related = \App\Model\helpdesk\Notification\Notification::class;
|
||||
$id = 'notification_id';
|
||||
|
||||
return $this->belongsTo($related, $id);
|
||||
@@ -23,7 +23,7 @@ class UserNotification extends BaseModel
|
||||
|
||||
public function users()
|
||||
{
|
||||
$related = 'App\User';
|
||||
$related = \App\User::class;
|
||||
$id = 'user_id';
|
||||
|
||||
return $this->belongsTo($related, $id);
|
||||
|
Reference in New Issue
Block a user