Backend for songs.zachdecook.com
Diffstat (limited to 'laravel/app/Playlist.php')
| -rw-r--r-- | laravel/app/Playlist.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/laravel/app/Playlist.php b/laravel/app/Playlist.php new file mode 100644 index 0000000..7284b0e --- /dev/null +++ b/laravel/app/Playlist.php @@ -0,0 +1,14 @@ +<?php + +namespace App; + +use Illuminate\Database\Eloquent\Model; + +class Playlist extends Model +{ + public $fillable = ['name']; + public function songs() + { + return $this->belongsToMany('App\Song'); + } +} |