Basic routes and BeerListController methods

This commit is contained in:
2021-09-04 23:54:41 +02:00
parent 1b8e76b183
commit 26dbfeb94a
20 changed files with 146 additions and 64 deletions

View File

@@ -9,9 +9,14 @@ class BeerList extends Model
{
use HasFactory;
protected $fillable = [
'title',
'user_id'
];
public function user()
{
return $this->belongsTo(User::class);
return $this->belongsTo(User::class, 'user_id');
}
public function beer()