We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents df41535 + 65e177b commit 69bc78fCopy full SHA for 69bc78f
1 file changed
src/Database/Barry/Model.php
@@ -164,9 +164,7 @@ public function __construct(array $attributes = [])
164
165
$this->original = $attributes;
166
167
- if ($this->connection !== null) {
168
- $this->setConnection(DB::getConnectionName());
169
- }
+ $this->setConnection($this->connection ?: DB::getConnectionName());
170
171
$this->table = static::query()->getTable();
172
}
0 commit comments