From 648acc48c72ec8793f30379cacf514decb9d14f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Tue, 25 Oct 2022 18:04:13 +0200 Subject: [PATCH] remove HasDataColumn trait --- src/Database/Concerns/HasDataColumn.php | 15 --------------- src/Database/Models/Tenant.php | 14 +++++++++----- 2 files changed, 9 insertions(+), 20 deletions(-) delete mode 100644 src/Database/Concerns/HasDataColumn.php diff --git a/src/Database/Concerns/HasDataColumn.php b/src/Database/Concerns/HasDataColumn.php deleted file mode 100644 index cf67b832..00000000 --- a/src/Database/Concerns/HasDataColumn.php +++ /dev/null @@ -1,15 +0,0 @@ -getAttribute($this->getTenantKeyName()); } + /** Get the current tenant. */ public static function current(): static|null { return tenant(); } - /** @throws TenancyNotInitializedException */ + /** + * Get the current tenant or throw an exception if tenancy is not initialized. + * + * @throws TenancyNotInitializedException + */ public static function currentOrFail(): static { return static::current() ?? throw new TenancyNotInitializedException;