We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 931edd5 commit b61f36cCopy full SHA for b61f36c
src/Traits/HasRoles.php
@@ -12,6 +12,6 @@ public function role()
12
}
13
14
public function getRoleNameAttribute(){
15
- return $this->role()->first() ? $this->role()->first()->name : null ;
+ return $this->role()->first()->name ?? null ;
16
17
0 commit comments