Skip to content

Commit b61f36c

Browse files
committed
Fix duplicate get user role on HasRole trait
1 parent 931edd5 commit b61f36c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Traits/HasRoles.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ public function role()
1212
}
1313

1414
public function getRoleNameAttribute(){
15-
return $this->role()->first() ? $this->role()->first()->name : null ;
15+
return $this->role()->first()->name ?? null ;
1616
}
1717
}

0 commit comments

Comments
 (0)