Last active
September 14, 2018 00:39
-
-
Save elialejandro/df374c0617280c71032238ae23d0510c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Application/Entity/AuthUser.php | |
namespace Application\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* @ORM\Entity | |
*/ | |
class AuthUser { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return [ | |
'doctrine' => [ | |
'connection' => [ | |
// First connection | |
'orm_default' => [ | |
'driverClass' => \Doctrine\DBAL\Driver\PDOMySql\Driver::class, | |
'params' => [ | |
'host' => 'localhost', | |
'port' => '3306', | |
'user' => 'username', | |
'password' => 'password', | |
'dbname' => 'database', | |
'diverOptions' => [ | |
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4' | |
], | |
], | |
], | |
// Second | |
'orm_regauth' => [ | |
'driverClass' => \Doctrine\DBAL\Driver\PDOMySql\Driver::class, | |
'params' => [ | |
'host' => 'localhost', | |
'port' => '3306', | |
'user' => 'username', | |
'password' => 'password', | |
'dbname' => 'database', | |
'diverOptions' => [ | |
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4' | |
], | |
], | |
], | |
], | |
], | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return [ | |
// ... | |
'doctrine' => [ | |
'driver' => [ | |
'user_entities' => [ | |
'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver', | |
'cache' => 'array', | |
'paths' => [ | |
__DIR__ . '/../src/Entity' | |
], | |
], | |
'orm_regauth' => [ | |
'drivers' => [ | |
'User\Entity' => 'user_entities', | |
], | |
], | |
], | |
], | |
]; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment