title: How to import data from one table to another table using Database: Seeding? (laravel 5.3)?
body: <p>My DatabaseSeeder is like this :</p>
  
  <pre><code>&lt;?php
  
  use Illuminate\Database\Seeder;
  use Illuminate\Database\Eloquent\Model;
  
  class DatabaseSeeder extends Seeder
  {
      public function run()
      {
          Model::unguard();
  
          $this-&gt;call('MasterLookupsTableSeeder')
      }
  }
  </code></pre>
  
  <p>My MasterLookupsTableSeeder is like this :</p>
  
  <pre><code>&lt;?php
  
  use Illuminate\Database\Seeder;
  use Illuminate\Database\Eloquent\Model;
  
  class MasterLookupsTableSeeder extends Seeder
  {
      public function run()
      {
          DB::table('master_lookups')-&gt;insert([
              'id'            =&gt;  '17',           
              'code'          =&gt;  '002',
              'name'          =&gt;  'sample data',
              'information'   =&gt;  NULL,
              'created_at'    =&gt;  date('Y-m-d H:i:s'),
              'updated_at'    =&gt;  date('Y-m-d H:i:s')
          ]);
      }
  }
  </code></pre>
  
  <p>When I run <code>php artisan db:seed --class=MasterLookupsTableSeeder</code>, it will insert into to table master_lookups. It is still static. I want to create a dynamic where the data is inserted into master_lookups table taken from another table, for example akuns table. akuns table have field id, code, name, code_shopping. </p>
  
  <p>I want like this :</p>
  
  <p>code data from akuns table insert to field code in table master_lookups</p>
  
  <p>name data from akuns table insert to field name in table master_lookups</p>
  
  <p>code_shopping data from akuns table insert to field information in table master_lookups in the form of json. data type of field information is json.</p>
  
  <p>Is there any people who can help me?</p>