'boolean', 'last_login_at' => 'datetime', 'password' => 'hashed', ]; } #[Scope] public function active(Builder $query): void { $query->where('is_active', true); } #[Scope] public function inactive(Builder $query): void { $query->where('is_active', false); } public function roleLabel(): Attribute { return Attribute::make( get: function () { $role = $this->roles->first(); return $role ? Role::from($role->name)->label() : null; }, ); } public function profile(): HasOne { return $this->hasOne(UserProfile::class); } public function employee(): HasOne { return $this->hasOne(Employee::class); } public function cashTransactions(): HasMany { return $this->hasMany(CashTransaction::class, 'created_by_id'); } }