1. Go to this page and download the library: Download aspendigital/fuel-doctrine2 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/ */
$em = \Fuel\Doctrine::manager(); // Uses the connection referred to by the 'active' index in your configuration
$em = \Fuel\Doctrine::manager('connection_2'); // Specify connection explicitly
print_r(\Fuel\Doctrine::version_check());
return array(
'active'=>'default',
'doctrine2'=>array(
'proxy_dir' => APPPATH . 'classes' . DS . 'proxy',
'proxy_namespace' => 'Proxy',
'metadata_path' => APPPATH . 'classes' . DS . 'entity',
'metadata_driver' => 'annotation',
'init_callback' => array('MyClass', 'init')
)
/**
* Base config, just need to set the DSN, username and password in env. config.
*/
'default' => array(
'type' => 'pdo',
'connection' => array(
'persistent' => false,
'compress' => false
),
'charset' => 'utf8',
'profiling' => false
)
);