Update ManageHostingSubscriptionBackups.php

This commit is contained in:
Bozhidar 2024-04-25 22:11:34 +03:00
parent b97ff2eb45
commit 15effd1c17

View file

@ -80,6 +80,15 @@ class ManageHostingSubscriptionBackups extends ManageRelatedRecords
public function table(Table $table): Table
{
$findHostingSubscription = HostingSubscriptionBackup::where('hosting_subscription_id', $this->record->id)
->where('status', 'processing')
->get();
if ($findHostingSubscription->count() > 0) {
foreach ($findHostingSubscription as $backup) {
$backup->checkBackup();
}
}
return $table
->recordTitleAttribute('id')
->columns([