mirror of
https://github.com/koel/koel
synced 2024-12-23 19:13:06 +00:00
15 lines
280 B
PHP
15 lines
280 B
PHP
<?php
|
|
|
|
namespace App\Services;
|
|
|
|
class Helper
|
|
{
|
|
/**
|
|
* Get a unique hash from a file path.
|
|
* This hash can then be used as the Song record's ID.
|
|
*/
|
|
public function getFileHash(string $path): string
|
|
{
|
|
return md5(config('app.key') . $path);
|
|
}
|
|
}
|