1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 18:34:04 +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:
Peter Lightbody 2021-08-19 10:41:06 +01:00 committed by GitHub
parent 20e1fa1959
commit ecb963b1f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,8 +28,6 @@ class Tenant extends Model implements Contracts\Tenant
Concerns\TenantRun,
Concerns\InvalidatesResolverCache;
protected $table = 'tenants';
protected $primaryKey = 'id';
protected $guarded = [];
public function getTenantKeyName(): string