Skip to content

Commit ef528f8

Browse files
authored
Merge pull request #39 from nathanjansen/main
Using Spaties multitenancy breaks running the commands
2 parents 33292b8 + 1e16cdc commit ef528f8

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

config/one-time-operations.php

+4
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,8 @@
77

88
// Table name - name of the table that stores your operation entries
99
'table' => 'operations',
10+
11+
// Database Connection Name - Change the model connection, support for Multitenancy
12+
// Only change when you want to deviate from your system default repository
13+
'connection' => null,
1014
];

src/Models/Operation.php

+5
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ public function __construct(array $attributes = [])
3434
$this->table = OneTimeOperationManager::getTableName();
3535
}
3636

37+
public function getConnectionName()
38+
{
39+
return config('one-time-operations.connection', $this->connection);
40+
}
41+
3742
protected static function newFactory(): OperationFactory
3843
{
3944
return new OperationFactory();

0 commit comments

Comments
 (0)