Modif readme inclusion yaml et exemple import
This commit is contained in:
parent
0d3686e34e
commit
e67eb62e57
31
Readme.md
31
Readme.md
|
@ -43,6 +43,16 @@ $result = $importService->import(
|
||||||
$logger
|
$logger
|
||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🧑💻 Exemple d'Importation dans le Contrôleur
|
||||||
|
|
||||||
|
Dans votre contrôleur ou service, n'oubliez pas d'importer les classes nécessaires pour utiliser le service d'importation :
|
||||||
|
|
||||||
|
```php
|
||||||
|
use Sudalys\ImportService\CsvImportService;
|
||||||
|
use Sudalys\ImportService\ExcelFileTransformer;
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -70,6 +80,21 @@ Géré via `ExcelFileTransformer` :
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## ⚙️ Configuration du Service dans `services.yaml`
|
||||||
|
|
||||||
|
Pour que le service fonctionne correctement dans Symfony, ajoutez la configuration suivante dans votre fichier `services.yaml` :
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
services:
|
||||||
|
Sudalys\ImportService\:
|
||||||
|
resource: '../vendor/sudalys/import-service/src/Service/Import/'
|
||||||
|
autowire: true
|
||||||
|
autoconfigure: true
|
||||||
|
public: false
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 🎓 Exigences
|
## 🎓 Exigences
|
||||||
|
|
||||||
- PHP >= 8.1
|
- PHP >= 8.1
|
||||||
|
@ -82,3 +107,9 @@ Géré via `ExcelFileTransformer` :
|
||||||
|
|
||||||
MIT
|
MIT
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue