diff --git a/app/Application.php b/app/Application.php index 65288106..17a2347a 100644 --- a/app/Application.php +++ b/app/Application.php @@ -43,7 +43,7 @@ class Application extends Model $name = $this->name; $name = preg_replace('/[^\p{L}\p{N}]/u', '', $name); - $class = '\App\SupportedApps\\'.$name.'\\'.$name; + $class = \App\SupportedApps::class.$name.'\\'.$name; return $class; } @@ -52,7 +52,7 @@ class Application extends Model { $name = preg_replace('/[^\p{L}\p{N}]/u', '', $name); - $class = '\App\SupportedApps\\'.$name.'\\'.$name; + $class = \App\SupportedApps::class.$name.'\\'.$name; return $class; } @@ -114,7 +114,7 @@ class Application extends Model return null; } $classname = preg_replace('/[^\p{L}\p{N}]/u', '', $app->name); - $app->class = '\App\SupportedApps\\'.$classname.'\\'.$classname; + $app->class = \App\SupportedApps::class.$classname.'\\'.$classname; return $app; } diff --git a/app/Item.php b/app/Item.php index 0e3f75ae..505ddf04 100644 --- a/app/Item.php +++ b/app/Item.php @@ -84,12 +84,12 @@ class Item extends Model public function parents() { - return $this->belongsToMany('App\Item', 'item_tag', 'item_id', 'tag_id'); + return $this->belongsToMany(\App\Item::class, 'item_tag', 'item_id', 'tag_id'); } public function children() { - return $this->belongsToMany('App\Item', 'item_tag', 'tag_id', 'item_id'); + return $this->belongsToMany(\App\Item::class, 'item_tag', 'tag_id', 'item_id'); } public function getLinkAttribute() @@ -257,6 +257,6 @@ class Item extends Model */ public function user() { - return $this->belongsTo('App\User'); + return $this->belongsTo(\App\User::class); } } diff --git a/app/Setting.php b/app/Setting.php index 5c4d3b32..69bede8c 100644 --- a/app/Setting.php +++ b/app/Setting.php @@ -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() diff --git a/app/SettingGroup.php b/app/SettingGroup.php index 5c306caf..45d05d48 100644 --- a/app/SettingGroup.php +++ b/app/SettingGroup.php @@ -22,6 +22,6 @@ class SettingGroup extends Model public function settings() { - return $this->hasMany('App\Setting', 'group_id'); + return $this->hasMany(\App\Setting::class, 'group_id'); } } diff --git a/app/User.php b/app/User.php index 8a8a76f1..36658f54 100644 --- a/app/User.php +++ b/app/User.php @@ -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()