mirror of
https://github.com/koel/koel
synced 2024-11-27 22:40:26 +00:00
Add cast to convert Song.length to float
This commit is contained in:
parent
6457528990
commit
2a0bd8fcd8
1 changed files with 7 additions and 0 deletions
|
@ -20,6 +20,13 @@ class Song extends Model
|
|||
*/
|
||||
protected $hidden = ['lyrics', 'created_at', 'updated_at', 'path', 'mtime'];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'length' => 'float'
|
||||
];
|
||||
|
||||
public function album()
|
||||
{
|
||||
return $this->belongsTo(Album::class);
|
||||
|
|
Loading…
Reference in a new issue