From d7ce82f90a699d1aa0e7013cbed36fbee76567a7 Mon Sep 17 00:00:00 2001 From: Bozhidar Date: Mon, 13 May 2024 20:50:28 +0300 Subject: [PATCH] Update ManageHostingSubscriptionFileManager.php --- .../Pages/ManageHostingSubscriptionFileManager.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/app/Filament/Resources/HostingSubscriptionResource/Pages/ManageHostingSubscriptionFileManager.php b/web/app/Filament/Resources/HostingSubscriptionResource/Pages/ManageHostingSubscriptionFileManager.php index b64a160..4dd1557 100644 --- a/web/app/Filament/Resources/HostingSubscriptionResource/Pages/ManageHostingSubscriptionFileManager.php +++ b/web/app/Filament/Resources/HostingSubscriptionResource/Pages/ManageHostingSubscriptionFileManager.php @@ -68,8 +68,10 @@ class ManageHostingSubscriptionFileManager extends ViewRecord implements HasTabl public function table(Table $table): Table { - $hostingSubscription = HostingSubscription::select(['id'])->first(); - $findDomain = Domain::select(['home_root', 'hosting_subscription_id', 'is_main'])->where('hosting_subscription_id', $hostingSubscription->id)->where('is_main',1)->first(); + $findDomain = Domain::select(['home_root', 'hosting_subscription_id', 'is_main']) + ->where('hosting_subscription_id', $this->record->id) + ->where('is_main',1)->first(); + $this->disk = $findDomain->home_root; $storage = Storage::build([