mirror of
https://github.com/koel/koel
synced 2024-12-28 05:23:05 +00:00
15 lines
285 B
PHP
15 lines
285 B
PHP
<?php
|
|
|
|
namespace App\Services;
|
|
|
|
class HelperService
|
|
{
|
|
/**
|
|
* 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);
|
|
}
|
|
}
|