Skip to content

Commit

Permalink
Add $this->configDbConnection(); on construct models
Browse files Browse the repository at this point in the history
  • Loading branch information
zerossB authored Aug 20, 2024
1 parent a37ecda commit b078461
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Models/Produto/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public function __construct(array $attributes = [])
{
parent::__construct($attributes);
$this->table = config('sp-produto.table_prefix') . 'environments';
$this->configDbConnection();
}

public function personalizations(): BelongsToMany
Expand Down
1 change: 1 addition & 0 deletions src/Models/Produto/Personalization.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public function __construct(array $attributes = [])
{
parent::__construct($attributes);
$this->table = config('sp-produto.table_prefix') . 'personalizations';
$this->configDbConnection();
}

public function environments(): BelongsToMany
Expand Down
1 change: 1 addition & 0 deletions src/Models/Produto/Unit.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public function __construct(array $attributes = [])
{
parent::__construct($attributes);
$this->table = config('sp-produto.table_prefix') . 'units';
$this->configDbConnection();
}

/**
Expand Down

0 comments on commit b078461

Please sign in to comment.