mirror of
https://github.com/koel/koel
synced 2024-11-28 06:50:27 +00:00
Merge pull request #125 from mattsches/master
Add cast to convert Song.length to float
This commit is contained in:
commit
ee9c9fef52
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'];
|
protected $hidden = ['lyrics', 'created_at', 'updated_at', 'path', 'mtime'];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $casts = [
|
||||||
|
'length' => 'float'
|
||||||
|
];
|
||||||
|
|
||||||
public function album()
|
public function album()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Album::class);
|
return $this->belongsTo(Album::class);
|
||||||
|
|
Loading…
Reference in a new issue