Fix upload csv
This commit is contained in:
parent
dfedb4b512
commit
a864b251b2
|
@ -73,7 +73,8 @@ switch (filter('op')) {
|
|||
$limit = 500;
|
||||
|
||||
// Inizializzazione del lettore CSV
|
||||
$csv = new $import_manager($record->filepath);
|
||||
$filepath = base_dir().'/files/'.$record->directory.'/'.$record->filename;
|
||||
$csv = new $import_manager($filepath);
|
||||
foreach ($fields as $key => $value) {
|
||||
$csv->setColumnAssociation($key, (int) $value - 1);
|
||||
}
|
||||
|
|
|
@ -31,6 +31,10 @@ class Import extends Model
|
|||
|
||||
protected $table = 'zz_imports';
|
||||
|
||||
protected static $translated_fields = [
|
||||
'name',
|
||||
];
|
||||
|
||||
// Relazioni Eloquent
|
||||
public function moduloCollegato()
|
||||
{
|
||||
|
@ -41,4 +45,9 @@ class Import extends Model
|
|||
{
|
||||
return 'Import';
|
||||
}
|
||||
|
||||
public static function getTranslatedFields()
|
||||
{
|
||||
return self::$translated_fields;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue