Created
March 30, 2017 05:08
-
-
Save web-hat/6e16076e1afb0cbfb93aece70d71c66d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Defining a connection in Query Builder | |
$data = DB::connection('mysql_second') | |
->table('table_name') | |
->select('col_1') | |
->get(); | |
//Defining a connection within the Schema Builder. | |
Schema::connection('mysql_second')->create('table_name', function($table) { | |
$table->increments('id'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment