This commit is contained in:
Ludovic CANDELLIER
2022-11-11 13:05:40 +01:00
parent dae8156164
commit ebe7ba5f6c
104 changed files with 1212 additions and 764 deletions

View File

@@ -579,4 +579,15 @@ class Articles
{
return self::update(['homepage' => $homepage], $id);
}
public static function getNumericHash($id)
{
return hexdec(self::getHash($id));
}
public static function getHash($id)
{
$name = self::get($id)->name ?? false;
return $name ? hash('crc32c', Str::slug($name)) : false;
}
}