Re: [Cakephp3] Best way to change database on the fly by user

2016-03-02 Thread rumble
You could bind a database with relation to your app.php and the datasources there, and based on param in url or some values in a table, execute in your controller: ConnectionManager::alias($custom_db, 'default'); I am testing similar scenario, but on the model level. On Tuesday, February 23,

[Cakephp3] Best way to change database on the fly by user

2016-02-23 Thread MichaƂ Piotrowski
Hello ! I used cakephp 3 to implement my apps and it's awesome :) Now I try to implement datasource by user: - one datasource by request - every user can use diffrent database Now i used vars cache and read it after user login in tables static function defaultConnectionName this solution isn't