We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26b43fc commit 1c9dc1cCopy full SHA for 1c9dc1c
src/Traits/HasRoles.php
@@ -10,4 +10,8 @@ public function role()
10
{
11
return $this->belongsTo(Role::class);
12
}
13
+
14
+ public function getRoleNameAttribute(){
15
+ return $this->role()->first() ? $this->role()->first()->name : null ;
16
+ }
17
0 commit comments