lasthourcloud/app/Http/Livewire/Project/Application/GetDeployments.php

20 lines
518 B
PHP
Raw Normal View History

2023-04-19 10:42:15 +00:00
<?php
2023-04-25 09:01:56 +00:00
namespace App\Http\Livewire\Project\Application;
2023-04-19 10:42:15 +00:00
use Livewire\Component;
use Spatie\Activitylog\Models\Activity;
2023-04-25 09:01:56 +00:00
class GetDeployments extends Component
2023-04-19 10:42:15 +00:00
{
public string $deployment_uuid;
public string $created_at;
public string $status;
public function polling()
{
2023-05-03 06:51:03 +00:00
$activity = Activity::where('properties->type_uuid', '=', $this->deployment_uuid)->first();
2023-04-19 10:42:15 +00:00
$this->created_at = $activity->created_at;
$this->status = data_get($activity, 'properties.status');
}
}