Update Genre model, MusicInfo model and related migration, use these models in some of the queries

This commit is contained in:
DariusIII
2017-10-10 14:16:28 +02:00
parent 76b4b78c2c
commit 48bdb159a8
8 changed files with 249 additions and 293 deletions
+5
View File
@@ -19,4 +19,9 @@ class Genre extends Model
* @var array
*/
protected $guarded = [];
public function music()
{
return $this->hasMany('App\Models\MusicInfo', 'genres_id');
}
}