fix(#136): mac address matching is case senstive

This commit is contained in:
Benjamin Nussbaum 2025-12-29 23:07:21 +01:00
parent a5cb38421e
commit 1298814521
3 changed files with 82 additions and 5 deletions

View file

@ -20,6 +20,14 @@ class Device extends Model
protected $guarded = ['id'];
/**
* Set the MAC address attribute, normalizing to uppercase.
*/
public function setMacAddressAttribute(?string $value): void
{
$this->attributes['mac_address'] = $value ? mb_strtoupper($value) : null;
}
protected $casts = [
'battery_notification_sent' => 'boolean',
'proxy_cloud' => 'boolean',