@@ -201,4 +201,22 @@ class ImportFactory extends Factory
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a supplier import type.
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function manufacturers()
|
||||
{
|
||||
return $this->state(function (array $attributes) {
|
||||
$fileBuilder = Importing\ManufacturersImportFileBuilder::new();
|
||||
$attributes['name'] = "Manufacturer {$attributes['name']}";
|
||||
$attributes['import_type'] = 'manufacturer';
|
||||
$attributes['header_row'] = $fileBuilder->toCsv()[0];
|
||||
$attributes['first_row'] = $fileBuilder->firstRow();
|
||||
|
||||
return $attributes;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user