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

@@ -32,7 +32,7 @@ class User extends Authenticatable
*/
public function items()
{
return $this->hasMany('App\Item');
return $this->hasMany(\App\Item::class);
}
/**
@@ -40,7 +40,7 @@ class User extends Authenticatable
*/
public function settings()
{
return $this->belongsToMany('App\Setting')->withPivot('uservalue');
return $this->belongsToMany(\App\Setting::class)->withPivot('uservalue');
}
public static function currentUser()