Laravel Multiple Database Connection

laravel multiple database connection

to change datebase and db host host for perticular model,Please refer below code

step 1 : In .env file create below constants

step 2 : In Config\database.php push below array values in ‘connections’ array

step 3 : In your model file use below code