Laravel Import csv to database -
i new laravel , know if there better way import data csv database.also need import data multiple tables if can me out great time saver me, sample code appreciated.
very wake description, snip of how it:
$fp = fopen($vendor->product_feed_url, 'r'); $head = fgetcsv($fp, 1000, ',', '"'); while ($column = fgetcsv($fp, 1000, ',', '!')) { try { if (!(count($head)==count($column))){ continue; } $column = array_combine($head, $column);
in $column, should have 1 line csv document.
Comments
Post a Comment