mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 23:18:10 +00:00
fix(#136): mac address matching is case senstive
This commit is contained in:
parent
a5cb38421e
commit
1298814521
3 changed files with 82 additions and 5 deletions
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue