mirror of
https://github.com/brunofontes/shareit.git
synced 2025-11-15 16:00:54 -03:00
Creating relationships between users/items/products
This commit is contained in:
@@ -32,4 +32,9 @@ class User extends Authenticatable
|
||||
{
|
||||
return $this->hasMany(Product::class);
|
||||
}
|
||||
|
||||
public function items()
|
||||
{
|
||||
return $this->belongsToMany(Item::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user