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 13: Línea 13:
  doctrine:
  doctrine:
     orm:
     orm:
      auto_mapping: true
       filters:
       filters:
        softdeleteable:
            softdeleteable:
            class: Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter
                class: Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter
            enabled: true
                enabled: true


=== Stof doctrine extensions ===
=== Stof doctrine extensions ===

Revisión del 07:03 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:
      auto_mapping: true
      filters:
           softdeleteable:
               class: Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter
               enabled: true

Stof doctrine extensions

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