fix: shorter cuids (7)
feat: show deployments
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user