destination->server; $containers = getCurrentApplicationContainerStatus($server, $application->id); if ($containers->count() > 0) { foreach ($containers as $container) { $containerName = data_get($container, 'Names'); if ($containerName) { instant_remote_process( ["docker rm -f {$containerName}"], $server ); } } // TODO: make notification for application // $application->environment->project->team->notify(new StatusChanged($application)); } } }