More databases configuration in config.neon 07/08/2015

If you need to connect to different database in different repositories. Follows Nette Sandbox configuration. config.neon database: db1: dsn: 'mysql:host=localhost;dbname=db1' user: root password: password db2: dsn: 'mysql:host=localhost;dbname=db2' user: root password: passsword services: - App\Model\Repositories\UserRepository(@database.db1.context) - App\Model\Repositories\PotatoRepository(@database.db2.context)

If you need to connect to different database in different repositories. Follows Nette Sandbox configuration.

config.neon


database:
	db1:
		dsn: 'mysql:host=localhost;dbname=db1'
		user: root
		password: password
	db2:
		dsn: 'mysql:host=localhost;dbname=db2'
		user: root
		password: passsword


services:
	- App\Model\Repositories\UserRepository(@database.db1.context)
	- App\Model\Repositories\PotatoRepository(@database.db2.context)