PHP code example of mediagone / types-common-doctrine

1. Go to this page and download the library: Download mediagone/types-common-doctrine 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/ */

    

mediagone / types-common-doctrine example snippets


use Doctrine\DBAL\Types\Type;
use Mediagone\Doctrine\Types\Common\Text\SlugType;

Type::addType(SlugType::NAME, SlugType::class);
// or, with a custom name:
Type::addType('app_slug', SlugType::class);