mirror of
https://github.com/brunofontes/shareit.git
synced 2025-11-15 07:50:54 -03:00
Adding URL to PRODUCT
This commit is contained in:
@@ -6,7 +6,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Product extends Model
|
||||
{
|
||||
protected $fillable = ['user_id', 'name'];
|
||||
protected $fillable = ['user_id', 'name', 'url'];
|
||||
|
||||
public function items()
|
||||
{
|
||||
@@ -17,12 +17,4 @@ class Product extends Model
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
//Ótima forma de adicionar um item por dentro do produto. Mas não estou usando por não saber como lidar com a table de UsuáriosPorItem
|
||||
/*
|
||||
public function addItem($name)
|
||||
{
|
||||
$this->items()->create(compact('name'));
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user