1. Go to this page and download the library: Download luna/laravel-importer library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
return [
/***********************************************************
* Importers are used for defining specific import tasks
* For instance, a ProductImporter could import a file with
* products into a table.
***********************************************************/
'importers' => [
'default' => \App\Importers\ProductImporter::class
],
/***********************************************************
* Runners are used for looping through the file
* The default is a CSV runner which will loop though
* CSV files line-by-line. A runner uses an importer to get
* import specific settings like the model class.
***********************************************************/
'runners' => [
'default' => \Luna\Importer\Runners\CsvRunner::class
]
];