title: Store data into database using request json string in laravel
body: <p>I am having a table name Student ( id , name , division ). To store data into this table I am sending json string as a request to the api in laravel.</p>
  <p><strong>Request json string is,</strong></p>
  <pre><code>{
  &quot;name&quot;:&quot;abc&quot;,
  &quot;division&quot;:&quot;a&quot;,
  &quot;city&quot;:&quot;xyz&quot;
  }
  </code></pre>
  <p><strong>Controller Code</strong></p>
  <pre><code> public function registerStudent(Request $request){
  
      $requestData = $request-&gt;json()-&gt;all(); 
      $studentModel = Student::create($requestData);
  
   }
  </code></pre>
  <p><strong>Student Model</strong></p>
  <pre><code>class Student extends Model
  {
      protected $fillable = [
          'id', 'name','division'
      ];
  
     
  }
  </code></pre>
  <p>When i execute this code , i get the following error,</p>
  <pre><code>Illuminate\Database\QueryException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'city' in 'field list' (SQL: insert into `Student`... 
  </code></pre>
  <p>now my question here is, in what way I can store the data into database from json request with having extra keys into json object/array.</p>