Diferencia entre revisiones de «Instalar y configurar SoftDeleteable en Symfony»

De Wiki Proyectos Beta
Ir a la navegación Ir a la búsqueda
Línea 19: Línea 19:


=== Stof doctrine extensions ===
=== Stof doctrine extensions ===
stof_doctrine_extensions:
orm:
    default:
        timestampable: true
        softdeleteable: true

Revisión del 06:58 1 sep 2024

Instalar

 composer require stof/doctrine-extensions-bundle

Configurar

Doctrine

Entramos en el archivo config/packages/doctrine.yaml

Agregamos lo siguiente:

doctrine:
   orm:
      filters:
        softdeleteable:
            class: Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter
            enabled: true

Stof doctrine extensions

stof_doctrine_extensions:
orm:
    default:
        timestampable: true
        softdeleteable: true