title: Is it possible to import data to multiple tables from one excel sheet using laravel excel?
body: <p>We are creating an application were a user can upload an excel file that contains information for multiple tables. (See screenshot below for example). Is it possible to split this data up and create multiple models to be imported into a database using laravel excel? If not, is there another package that you'd recommend using? </p>
  
  <p>Correct me if I'm wrong, but from my understanding you can only have one model per import in the controller.</p>
  
  <p>Controller:</p>
  
  <pre><code>class ImportsController
  {
      public function import()
      {
          Excel::import(new DataImport, 'testSheet.xlsx'); //only allows for one model
  
          return redirect('/')-&gt;with('success', 'All good!');
      }
  }
  </code></pre>
  
  <p>Import:</p>
  
  <pre><code>class DataImport implements ToModel
  {
      public function model(array $row)
      {
          // need way to create and return multiple models
          return new Data([
  
          ]);
      }
  }
  </code></pre>
  
  <p>Route:</p>
  
  <pre><code>Route::get('/import', 'ImportsController@import');
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/D21oG.png" rel="noreferrer"><img src="https://i.stack.imgur.com/D21oG.png" alt="First row is table name, second row is field name, all following rows are data"></a></p>
  
  <p>First row is table name, second row is field name, all following rows are data</p>