This commit is contained in:
baodev0
2026-07-06 08:16:06 +07:00
parent 9a16a5c313
commit 61fc870c03
2 changed files with 8 additions and 3 deletions
+5
View File
@@ -63,6 +63,11 @@ class User extends Authenticatable implements JWTSubject
return [];
}
public function getNameAttribute(): string
{
return trim($this->firstname . ' ' . $this->lastname);
}
public function staffOnline()
{
return $this->hasOne(\App\Models\Staff::class, 'user_id', 'id');