mirror of
https://github.com/koel/koel
synced 2024-12-01 00:09:17 +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);
|
|
}
|
|
}
|