Skip to content

Commit bd6eb21

Browse files
authored
Merge pull request #81 from ChrisThompsonTLDR/master
Fixing a bug with the model's connection
2 parents cec58db + 9bd61e6 commit bd6eb21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Kodeine/Metable/Metable.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ public function setAttributes(array $attributes) {
351351
* @return boolean
352352
*/
353353
public function hasColumn($column) {
354-
if(empty(self::$_columnNames)) self::$_columnNames = array_map('strtolower',\Schema::connection($this->connection)->getColumnListing($this->getTable()));
354+
if(empty(self::$_columnNames)) self::$_columnNames = array_map('strtolower',\Schema::connection($this->getConnectionName())->getColumnListing($this->getTable()));
355355
return in_array(strtolower($column), self::$_columnNames);
356356
}
357357

0 commit comments

Comments
 (0)