PHP code example of alireaza / doctrine-orm

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

    

alireaza / doctrine-orm example snippets


use AliReaza\Doctrine\ORM\Doctrine;

$doctrine = new Doctrine([
    'driver' => 'pdo_mysql',
    'host' => 127.0.0.1,
    'port' => 3306,
    'user' => 'root',
    'password' => '',
    'dbname' => 'database_name'
], [
    'app/Entities'
]);

$em = $doctrine->getEntityManager();