title: MassAssignmentException in Model.php line 232
body: <p>I have the following Bus model:</p>
  
  <pre><code>class Bus extends Model
  {
      protected $guarded =[''];
      protected $fillable = ['plate_num','seat_num'];
  
      public function seats(){
  
          return $this-&gt;hasMany(Seat::class);
      }
  
      public function addSeat($number){
  
          $this-&gt;seats()-&gt;create([
              'seat_num'=&gt; $number
  
              ]);
      }
  }
  </code></pre>
  
  <p>And in my BusController I have the following store function that gets 2 values from a form('plate_num' and 'seats_num')</p>
  
  <p>Although I have the <strong>$fillable</strong> array with the fields needed(<strong>Seat@seat_num</strong> and <strong>Bus@plate_num</strong>), however,  Whenever I submit the form I get the following error: </p>
  
  <blockquote>
    <p>MassAssignmentException in Model.php line 232 Seat_num</p>
  </blockquote>
  
  <p>The logic of the code is basically whenever i key in the <strong>bus plate number</strong> and <strong>number of seats</strong> for example <strong>"ABC213"</strong> and <strong>"5"</strong>, one record should be created in the buses table that includes the plate_num, and 5 records should b created in the Seats table whereby each record gets the id of the bus and the seat number.</p>