diff --git a/packages/model/src/Model.php b/packages/model/src/Model.php index e8913e9..59410b3 100644 --- a/packages/model/src/Model.php +++ b/packages/model/src/Model.php @@ -12,7 +12,7 @@ class Model extends Eloquent\Model public static $schema = []; - protected static $sqliteConnection; + protected static $sqliteConnections = []; protected static function boot() { @@ -143,12 +143,12 @@ public static function migrate($locale = null) public static function resolveConnection($connection = null) { - return static::$sqliteConnection; + return static::$sqliteConnections[static::class]; } protected static function setSqliteConnection($database) { - static::$sqliteConnection = app(ConnectionFactory::class)->make([ + static::$sqliteConnections[static::class] = app(ConnectionFactory::class)->make([ 'driver' => 'sqlite', 'database' => $database, ]); @@ -158,4 +158,4 @@ public function usesTimestamps() { return false; } -} \ No newline at end of file +}