mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 16:54:05 +00:00
Remove default table override
By setting a default table value, Eloquent cannot automatically detect the table name based on the model name. Unless the developer actively sets a table property, this can cause migration issues when using anything other than a model called`Tenant`. This PR removes the default value and lets eloquent detect the correct table (which, if using the default Tenant model, will default to the current value. (`primaryKey` isn't an issue, but it adds nothing so has also be removed)
This commit is contained in:
parent
20e1fa1959
commit
ecb963b1f4
1 changed files with 0 additions and 2 deletions
|
|
@ -28,8 +28,6 @@ class Tenant extends Model implements Contracts\Tenant
|
||||||
Concerns\TenantRun,
|
Concerns\TenantRun,
|
||||||
Concerns\InvalidatesResolverCache;
|
Concerns\InvalidatesResolverCache;
|
||||||
|
|
||||||
protected $table = 'tenants';
|
|
||||||
protected $primaryKey = 'id';
|
|
||||||
protected $guarded = [];
|
protected $guarded = [];
|
||||||
|
|
||||||
public function getTenantKeyName(): string
|
public function getTenantKeyName(): string
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue