koel/app/Services/HelperService.php

16 lines
285 B
PHP
Raw Normal View History

2018-08-29 06:15:11 +00:00
<?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
{
2019-06-30 11:13:41 +00:00
return md5(config('app.key').$path);
2018-08-29 06:15:11 +00:00
}
}