Skip to content

Commit

Permalink
fix: make connection nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
Rocksheep committed Nov 15, 2024
1 parent e86a06a commit 03228bd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/IndexedRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ class IndexedRecord extends Model
*/
public function __construct(array $attributes = [])
{
$this->connection = Config::string('laravel-fulltext.db_connection');
$connection = Config::get('laravel-fulltext.db_connection');

if (!is_string($connection)) {
$connection = null;
}

$this->connection = $connection;

parent::__construct($attributes);
}
Expand Down

0 comments on commit 03228bd

Please sign in to comment.