This commit is contained in:
Bozhidar Slaveykov 2024-04-06 20:30:34 +03:00
parent 61dac972d4
commit d2efad470e
2 changed files with 15 additions and 0 deletions

View file

@ -82,6 +82,10 @@ class PhyreServerResource extends Resource
->action(function ($record) {
$record->healthCheck();
}),
Tables\Actions\Action::make('Sync Resources')
->action(function ($record) {
$record->syncResources();
}),
Tables\Actions\EditAction::make(),
])
->bulkActions([

View file

@ -29,6 +29,17 @@ class PhyreServer extends Model
}
public function syncResources()
{
// Sync Hosting Plans
$getHostingPlans = HostingPlan::all();
if ($getHostingPlans->count() > 0) {
foreach ($getHostingPlans as $hostingPlan) {
}
}
}
public function healthCheck()
{
try {