mirror of
https://github.com/linuxserver/Heimdall.git
synced 2026-02-21 20:20:34 +09:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user