Shift bindings

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:
Shift
2022-03-19 13:54:33 +00:00
parent b1dc4d4a41
commit 297c2bb30f
5 changed files with 11 additions and 11 deletions

View File

@@ -147,7 +147,7 @@ class Setting extends Model
public function group()
{
return $this->belongsTo('App\SettingGroup', 'group_id');
return $this->belongsTo(\App\SettingGroup::class, 'group_id');
}
/**
@@ -232,7 +232,7 @@ class Setting extends Model
*/
public function users()
{
return $this->belongsToMany('App\User')->using('App\SettingUser')->withPivot('uservalue');
return $this->belongsToMany(\App\User::class)->using(\App\SettingUser::class)->withPivot('uservalue');
}
public static function user()