PHP code example of zogxray / soft-deletable-bundle

1. Go to this page and download the library: Download zogxray/soft-deletable-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

zogxray / soft-deletable-bundle example snippets


return [
    Zogxray\SoftDeletableBundle\SoftDeletableBundle::class => ['all' => true],
];

class Order implements SoftDeletableInterface
{
    /**
     * @return \DateTime|null
     */
    public function getDeletedAt() :?\DateTime
    {
        return $this->deletedAt;
    }

    /**
     * @param \DateTime|null $deletedAt
     */
    public function setDeletedAt(?\DateTime $deletedAt): void
    {
        $this->deletedAt = $deletedAt;
    }
}

    dbal:
        default_connection: default
        connections:
            default:
                driver: 'pdo_sqlite'
                server_version: '3.15'
                charset: utf8mb4
                url: '%env(resolve:DATABASE_URL)%'