Skip to content

Commit bc61766

Browse files
author
Gabriel Tadra Mainginski
committed
Changing singleton to bind to make possible multiple connections with default eloquent (#9)
1 parent abe9884 commit bc61766

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

Database/SybaseServiceProvider.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,8 @@ class SybaseServiceProvider extends ServiceProvider
1212
*/
1313
public function register()
1414
{
15-
// Register the MySql connection class as a singleton
16-
// because we only want to have one, and only one,
17-
// MySql database connection at the same time.
18-
$this->app->singleton('db.connection.sqlsrv', function ($app, $parameters) {
19-
// First, we list the passes parameters into single
20-
// variables. I do this because it is far easier
21-
// to read than using it as eg $parameters[0].
15+
$this->app->bind('db.connection.sqlsrv', function ($app, $parameters) {
2216
list($connection, $database, $prefix, $config) = $parameters;
23-
24-
// Next we can initialize the connection.
2517
return new SybaseConnection($connection, $database, $prefix, $config);
2618
});
2719
}

0 commit comments

Comments
 (0)