How to change the laravel form configurator, but the connection information stored in the database, such as the database manager, is my example:
I have a database in my database:
id, driver, database_name, username, password, host
so on my controller it just gets called:
$connection = Database::find( 1 );
$users = new Users();
$users->setConnection( [
'driver' => $connection->driver,
'host' => $connection->host,
'username' => $connection->username,
'password' => $connection->password
] );
$users = $users->get();
source
share