fix: shorter cuids (7)

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

No files matched your search

+4 -1
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();
+1 -1
View File
@@ -12,7 +12,7 @@ abstract class BaseModel extends Model
parent::boot();
static::creating(function (Model $model) {
$model->uuid = (string) new Cuid2();
$model->uuid = (string) new Cuid2(7);
});
}
}
+1 -1
View File
@@ -48,7 +48,7 @@ class User extends Authenticatable
parent::boot();
static::creating(function (Model $model) {
$model->uuid = (string) new Cuid2();
$model->uuid = (string) new Cuid2(7);
});
}
public function teams()