coolify/app/Http/Livewire/Project/Application/GetDeployments.php
2023-05-03 08:51:03 +02:00

20 lines
518 B
PHP

<?php
namespace App\Http\Livewire\Project\Application;
use Livewire\Component;
use Spatie\Activitylog\Models\Activity;
class GetDeployments extends Component
{
public string $deployment_uuid;
public string $created_at;
public string $status;
public function polling()
{
$activity = Activity::where('properties->type_uuid', '=', $this->deployment_uuid)->first();
$this->created_at = $activity->created_at;
$this->status = data_get($activity, 'properties.status');
}
}