Updating One to many relation in laravel 5.3
问题 I want to update a one to many relationship. For example I have a model called Product class Product extends Model { protected $primaryKey = 'product_id'; public $timestamps = FALSE; public function Size(){ return $this->hasMany('App\Size'); } } and a model called Size class Size extends Model { public $timestamps = FALSE; protected $fillable = ['product_id','size']; public function Product(){ return $this->belongsTo('App\Product'); } here is my controller: public function update(Request