fix: shorter cuids (7)

feat: show deployments
This commit is contained in:
Andras Bacsai
2023-03-29 12:52:22 +02:00
parent 78c4344583
commit 1c259fe12e
11 changed files with 28 additions and 22 deletions

View File

@@ -22,7 +22,10 @@ class Application extends BaseModel
{
return $this->morphTo();
}
public function deployments()
{
return Activity::where('subject_id', $this->id)->where('properties->deployment_uuid', '!=', null)->orderBy('created_at', 'desc')->get();
}
public function get_deployment(string $deployment_uuid)
{
return Activity::where('subject_id', $this->id)->where('properties->deployment_uuid', '=', $deployment_uuid)->first();