Added models for albums and songs
This commit is contained in:
21
app/Fieldprotocol/Music/Song.php
Normal file
21
app/Fieldprotocol/Music/Song.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Fieldprotocol\Music;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model as Eloquent;
|
||||
|
||||
class Song extends Eloquent {
|
||||
|
||||
protected $table = 'songs';
|
||||
|
||||
protected $fillable = [
|
||||
'title',
|
||||
'album_id',
|
||||
'track_order',
|
||||
];
|
||||
|
||||
public function album() {
|
||||
return $this->belongsTo('FieldProtocol\Music\Album');
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user