diff --git a/config/packages/nyholm_psr7.yaml b/config/packages/nyholm_psr7.yaml new file mode 100644 index 0000000..ade8312 --- /dev/null +++ b/config/packages/nyholm_psr7.yaml @@ -0,0 +1,11 @@ +services: + # Register nyholm/psr7 services for autowiring with PSR-17 (HTTP factories) + Psr\Http\Message\RequestFactoryInterface: '@nyholm.psr7.psr17_factory' + Psr\Http\Message\ResponseFactoryInterface: '@nyholm.psr7.psr17_factory' + Psr\Http\Message\ServerRequestFactoryInterface: '@nyholm.psr7.psr17_factory' + Psr\Http\Message\StreamFactoryInterface: '@nyholm.psr7.psr17_factory' + Psr\Http\Message\UploadedFileFactoryInterface: '@nyholm.psr7.psr17_factory' + Psr\Http\Message\UriFactoryInterface: '@nyholm.psr7.psr17_factory' + + nyholm.psr7.psr17_factory: + class: Nyholm\Psr7\Factory\Psr17Factory diff --git a/config/packages/vich_uploader.yaml b/config/packages/vich_uploader.yaml new file mode 100644 index 0000000..2e06817 --- /dev/null +++ b/config/packages/vich_uploader.yaml @@ -0,0 +1,10 @@ +vich_uploader: + db_driver: orm + mappings: + sortie_images: + uri_prefix: /img/sortie + upload_destination: '%kernel.project_dir%/public/img/sortie' + namer: + service: Vich\UploaderBundle\Naming\UniqidNamer + delete_on_update: true + delete_on_remove: true \ No newline at end of file diff --git a/migrations/Version20241127091836.php b/migrations/Version20241127091836.php new file mode 100644 index 0000000..cc2b699 --- /dev/null +++ b/migrations/Version20241127091836.php @@ -0,0 +1,31 @@ +addSql('ALTER TABLE sortie ADD image VARCHAR(255) DEFAULT NULL, ADD updated_at DATETIME DEFAULT NULL'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE sortie DROP image, DROP updated_at'); + } +} diff --git a/public/img/sortie/6746e46ee2d07656618825.jpg b/public/img/sortie/6746e46ee2d07656618825.jpg new file mode 100644 index 0000000..7f1e47c Binary files /dev/null and b/public/img/sortie/6746e46ee2d07656618825.jpg differ diff --git a/public/img/sortie/67470b91e2090020716942.jpg b/public/img/sortie/67470b91e2090020716942.jpg new file mode 100644 index 0000000..7f1e47c Binary files /dev/null and b/public/img/sortie/67470b91e2090020716942.jpg differ