Merge pull request #125 from mattsches/master

Add cast to convert Song.length to float
This commit is contained in:
Phan An 2015-12-21 10:16:26 +08:00
commit ee9c9fef52

View file

@ -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);