des trucs
This commit is contained in:
11
config/packages/nyholm_psr7.yaml
Normal file
11
config/packages/nyholm_psr7.yaml
Normal file
@@ -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
|
||||||
10
config/packages/vich_uploader.yaml
Normal file
10
config/packages/vich_uploader.yaml
Normal file
@@ -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
|
||||||
31
migrations/Version20241127091836.php
Normal file
31
migrations/Version20241127091836.php
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace DoctrineMigrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Auto-generated Migration: Please modify to your needs!
|
||||||
|
*/
|
||||||
|
final class Version20241127091836 extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function getDescription(): string
|
||||||
|
{
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this up() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->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');
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
public/img/sortie/6746e46ee2d07656618825.jpg
Normal file
BIN
public/img/sortie/6746e46ee2d07656618825.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.6 KiB |
BIN
public/img/sortie/67470b91e2090020716942.jpg
Normal file
BIN
public/img/sortie/67470b91e2090020716942.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.6 KiB |
Reference in New Issue
Block a user