We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e4cdc57 + b61f36c commit 4469dfeCopy full SHA for 4469dfe
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