You can change the connection details during run time using
Config::set('database.connections.mysql.database', 'other_database');
but don't forget to purge before to delete the cache
DB::purge('mysql');
reference : http://stackoverflow.com/questions/31041893/laravel-change-database-connection-run-time
沒有留言:
張貼留言