diff --git a/app/Models/User.php b/app/Models/User.php index b3dc880..f47c02a 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -46,4 +46,12 @@ class User extends Authenticatable { return $this->hasMany(Character::class); } + + public function getRoleAttribute() + { + if (!$this->attributes['role']) { + return 'user'; + } + return $this->attributes['role']; + } }