diff --git a/web/app/Filament/Resources/PhyreServerResource.php b/web/app/Filament/Resources/PhyreServerResource.php index 6d7225a..823c5e4 100644 --- a/web/app/Filament/Resources/PhyreServerResource.php +++ b/web/app/Filament/Resources/PhyreServerResource.php @@ -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([ diff --git a/web/app/Models/PhyreServer.php b/web/app/Models/PhyreServer.php index da5696a..36cca16 100644 --- a/web/app/Models/PhyreServer.php +++ b/web/app/Models/PhyreServer.php @@ -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 {