mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-13 01:34:02 +00:00
Fix transactions
This commit is contained in:
parent
46609c5b0d
commit
c475e7a43d
11 changed files with 47 additions and 27 deletions
|
|
@ -5,13 +5,14 @@ declare(strict_types=1);
|
|||
namespace Stancl\Tenancy\StorageDrivers\Database;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Stancl\Tenancy\DatabaseManager;
|
||||
|
||||
/**
|
||||
* @internal Class is subject to breaking changes in minor and patch versions.
|
||||
*/
|
||||
class DomainModel extends Model
|
||||
{
|
||||
use CentralConnection;
|
||||
|
||||
protected $guarded = [];
|
||||
protected $primaryKey = 'id';
|
||||
public $incrementing = false;
|
||||
|
|
@ -21,9 +22,4 @@ class DomainModel extends Model
|
|||
{
|
||||
return config('tenancy.storage.db.table_names.DomainModel', 'domains');
|
||||
}
|
||||
|
||||
public function getConnectionName()
|
||||
{
|
||||
return config('tenancy.storage.db.connection') ?? app(DatabaseManager::class)->originalDefaultConnectionName;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue