restart
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user