phpldapadmin/app/Traits/MD5Updates.php
Deon George e4d2304696
All checks were successful
Create Docker Image / Test Application (x86_64) (push) Successful in 3m32s
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 1m36s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 4m43s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s
Attribute is no longer iterable - can be used now that we manage attribute tags
2025-04-05 23:24:55 +11:00

20 lines
425 B
PHP

<?php
/**
* Determine if a value has changed by comparing its MD5 value
*/
namespace App\Traits;
use Illuminate\Support\Arr;
trait MD5Updates
{
public function isDirty(): bool
{
foreach ($this->values_old->dot()->keys()->merge($this->values->dot()->keys())->unique() as $dotkey)
if (md5(Arr::get($this->values_old->dot(),$dotkey)) !== Arr::get($this->values->dot(),$dotkey))
return TRUE;
return FALSE;
}
}