Pivot scaffolding and new views for adding beers

This commit is contained in:
2021-09-05 02:09:38 +02:00
parent 26dbfeb94a
commit f4c030934a
11 changed files with 124 additions and 13 deletions

View File

@@ -21,6 +21,6 @@ class BeerList extends Model
public function beer()
{
return $this->hasMany(Beer::class);
return $this->belongsToMany(Beer::class, 'beer_list_pivot', 'beer_id', 'list_id');
}
}