From ecb963b1f4ea113abf630955889d6d8b8779c30f Mon Sep 17 00:00:00 2001 From: Peter Lightbody Date: Thu, 19 Aug 2021 10:41:06 +0100 Subject: [PATCH] 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) --- src/Database/Models/Tenant.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Database/Models/Tenant.php b/src/Database/Models/Tenant.php index 4ec685b7..9333fa81 100644 --- a/src/Database/Models/Tenant.php +++ b/src/Database/Models/Tenant.php @@ -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