You can easily swap between different databases/servers using Config::get and Config::set. I've managed to do it in those days! :)
$connections = Config::get('databases.connections.mysql'); $connections['host'] = "db.google.com"; $connections['database'] = "db2"; Config::set('database.connections.mysql', $connections);
I want when user writes him/her|self in a html form information about laravel mysql to rewrite in config folder the database settings for mysql from the form!
Yes, assuming php has permission to write files you can do this
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us