mirror of
https://github.com/koel/koel
synced 2024-12-25 12:03:06 +00:00
14 lines
216 B
PHP
14 lines
216 B
PHP
<?php
|
|
|
|
namespace App\Observers;
|
|
|
|
use App\Models\Song;
|
|
use App\Services\Helper;
|
|
|
|
class SongObserver
|
|
{
|
|
public function creating(Song $song): void
|
|
{
|
|
$song->id = Helper::getFileHash($song->path);
|
|
}
|
|
}
|