I am trying to save multiple rows to a table, however, I am presented with a Mass Assignment Error.
The error is: Illuminate \ Database \ Eloquent \ MassAssignmentException criteria_id
$criteria->save();
$criteria_id = $criteria->id;
foreach(Input::get('bedrooms') as $bedroom){
$new_bedroom=array(
'criteria_id' => $criteria->id,
'bedroom' => $bedroom,
);
$bedroom = new Bedroom($new_bedroom);
$bedroom->save();
}
My database structure is:

so there isn't any incorrect spelling. The criteria_id comes from the variable from the recently saved criteria (see code above forloop).
Any help would be greatly appreciated.
criteria_idin the$fillablearray of the model?foreachloop also. -->attach($criteria_id).