koel/app/Services/Helper.php

16 lines
280 B
PHP
Raw Normal View History

2018-08-29 06:15:11 +00:00
<?php
namespace App\Services;
class Helper
2018-08-29 06:15:11 +00:00
{
/**
* 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
{
2020-12-22 20:11:22 +00:00
return md5(config('app.key') . $path);
2018-08-29 06:15:11 +00:00
}
}