title: Why does exporting from Excel to Csv cause Laravel Seeder to fail silently when using Flynsarmy csv seeder package?
body: <p>I'm using this package: <a href="https://github.com/Flynsarmy/laravel-csv-seeder" rel="nofollow noreferrer">https://github.com/Flynsarmy/laravel-csv-seeder</a></p>
  
  <p>Flynsarmy Csv seeder works fine if I manually create a file and save it as a csv, then seed my database. Artisan responds with </p>
  
  <pre><code>"Seeding: ProductsTableSeeder
  Database seeding completed successfully."
  </code></pre>
  
  <p>However, if I save an Excel file as csv, I get the response, </p>
  
  <pre><code>"Seeding: ProductsTableSeeder"
  </code></pre>
  
  <p>It does not fail. No exceptions are thrown. But there is also <strong>no success message</strong>.</p>
  
  <p>When I check the DB, the tables are empty.</p>
  
  <p>Here's my migration 'up' method</p>
  
  <pre><code> {
      Schema::create('products', function (Blueprint $table) {
          $table-&gt;increments('id');
          $table-&gt;integer('sku')-&gt;nullable();
          $table-&gt;string('name');
          $table-&gt;string('species')-&gt;nullable();
          $table-&gt;string('fabric')-&gt;nullable();
          $table-&gt;string('panel')-&gt;nullable();
          $table-&gt;string('gauge_gasket')-&gt;nullable();
          $table-&gt;string('type')-&gt;nullable();
          $table-&gt;string('brand')-&gt;nullable();
          $table-&gt;string('brand_label')-&gt;nullable();
          $table-&gt;boolean('is_cjb');
          $table-&gt;boolean('is_osp');
          $table-&gt;boolean('is_starmark');
          $table-&gt;boolean('is_vision');
          $table-&gt;boolean('gasketed');;
          $table-&gt;string('color');
          $table-&gt;float('inside_width')-&gt;nullable();
          $table-&gt;float('inside_length')-&gt;nullable();
          $table-&gt;float('outside_width')-&gt;nullable();
          $table-&gt;float('outside_length')-&gt;nullable();
          $table-&gt;timestamps();
      });
  </code></pre>
  
  <p>Here's my implementation of Flynsarmy Csv Seeder:</p>
  
  <pre><code>use Flynsarmy\CsvSeeder\CsvSeeder;
  
      class ProductsTableSeeder extends CsvSeeder
      {
          /**
           * Run the database seeds.
           *
           * @return void
           */
                public function __construct()
            {
              $this-&gt;table = 'products';
              $this-&gt;filename = base_path().'/database/seeds/csvs/product_info.csv';
            }
  
            public function run()
            {
              // Recommended when importing larger CSVs
              DB::disableQueryLog();
  
              // Uncomment the below to wipe the table clean before populating
              DB::table($this-&gt;table)-&gt;truncate();
  
              parent::run();
  
  
            }
      }
  </code></pre>
  
  <p>Now, I suspected my issue is the csv file. I used csvlint.io and it says </p>
  
  <p>*</p>
  
  <blockquote>
    <p>Structural problem: Assumed header As there is no machine readable way
    to tell if your CSV has a header row, we have assumed that your CSV
    has one.</p>
  </blockquote>
  
  <p>*</p>
  
  <p>However, it gives this same message for the csv I manually created and that seems to work just fine.</p>
  
  <p>I thought it might be a permission issue and so I did an ls -lr on my /database/seeds/csvs directory and I get</p>
  
  <pre><code>-rw-rw-r-- 1 secretname secretname 18315 Dec 19 14:07 product_info.csv
  </code></pre>
  
  <p>I even did what friends don't let friends do, (chmod 777), but that fixed nothing, so it isn't a permissions issue.</p>
  
  <p>I've been repeatedly doing:</p>
  
  <pre><code>php artisan cache:clear
  composer dumpautoload
  php artisan migrate:fresh --seed
  </code></pre>
  
  <p>All I want to do is export from Excel to Csv and seed the database. Why is this such a problem?</p>
  
  <p>Here's a sample of my csv file. I have tried with both an id column and without (since laravel adds an id and autoincrements)</p>
  
  <pre><code>    sku,name,species,fabric,panel,finish,color,type,inside_width,inside_length,outside_width,outside_length,
  800124,air tray casket,,,,white,,,30.5,,,,
  555555,alex,metal,blue crepe,,paint,light blue,metal caskets,24.5,76.75,28.5,83,
  578645,alex,metal,rosetan crepe,,paint,copper,metal caskets,24.5,76.75,28.5,83,
  524785,alex,metal,oyster crepe,,paint,silver,metal caskets,24.5,76.75,28.5,83,
  483959,alex,metal,oyster crepe,,paint,white,metal caskets,24.5,76.75,28.5,83,
  </code></pre>
  
  <p>The flynsarmy csv they give as a sample was the one that worked successfully, It's simply</p>
  
  <pre><code>id,name
  1,Foo
  2,Bar
  </code></pre>