PHP code example of vrok / doctrine-addons

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

    

vrok / doctrine-addons example snippets


$queryBuilder->expr()->like('CAST(u.varchar, \'text\'))', ':parameterName')

$qb->andWhere("CONTAINS(u.numbers, :number) = true")
   ->setParameter('number', 3);

$qb->andWhere("JSON_CONTAINS_TEXT(u.roles, :searchRole) = true")
   ->setParameter('searchRole', 'ROLE_ADMIN');

$qb->andWhere("JSON_FIELD_AS_TEXT('u.address, :addrField) = :addrValue")
    ->setParameter('addrField', 'city')
    ->setParameter('addrValue', 'Dresden');