mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 22:34:03 +00:00
Configurable table names
This commit is contained in:
parent
d1be6c8e66
commit
2cf2ef0995
3 changed files with 15 additions and 3 deletions
|
|
@ -15,7 +15,11 @@ class DomainModel extends Model
|
|||
protected $primaryKey = 'id';
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
public $table = 'domains';
|
||||
|
||||
public function getTable()
|
||||
{
|
||||
return config('tenancy.storage.db.table_names.DomainModel', 'domains');
|
||||
}
|
||||
|
||||
public function getConnectionName()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,7 +15,11 @@ class TenantModel extends Model
|
|||
protected $primaryKey = 'id';
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
public $table = 'tenants';
|
||||
|
||||
public function getTable()
|
||||
{
|
||||
return config('tenancy.storage.db.table_names.TenantModel', 'tenants');
|
||||
}
|
||||
|
||||
public static function dataColumn()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue