An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
Fix styling
andrasbacsai96c4f5b8da27
diff --git a/app/Http/Controllers/Api/ApplicationsController.php b/app/Http/Controllers/Api/ApplicationsController.phpindex a83c17874f..cd4d724b45 100644--- a/app/Http/Controllers/Api/ApplicationsController.php+++ b/app/Http/Controllers/Api/ApplicationsController.php@@ -739,7 +739,7 @@ class ApplicationsController extends Controller$application->isConfigurationChanged(true);if ($instantDeploy) {- $deployment_uuid = new Cuid2();+ $deployment_uuid = new Cuid2;queue_application_deployment(application: $application,@@ -835,7 +835,7 @@ class ApplicationsController extends Controller$application->isConfigurationChanged(true);if ($instantDeploy) {- $deployment_uuid = new Cuid2();+ $deployment_uuid = new Cuid2;queue_application_deployment(application: $application,@@ -927,7 +927,7 @@ class ApplicationsController extends Controller$application->isConfigurationChanged(true);if ($instantDeploy) {- $deployment_uuid = new Cuid2();+ $deployment_uuid = new Cuid2;queue_application_deployment(application: $application,@@ -947,7 +947,7 @@ class ApplicationsController extends Controller]));} elseif ($type === 'dockerfile') {if (! $request->has('name')) {- $request->offsetSet('name', 'dockerfile-'.new Cuid2());+ $request->offsetSet('name', 'dockerfile-'.new Cuid2);}$validator = customApiValidator($request->all(), [sharedDataApplications(),@@ -1009,7 +1009,7 @@ class ApplicationsController extends Controller$application->isConfigurationChanged(true);if ($instantDeploy) {- $deployment_uuid = new Cuid2();+ $deployment_uuid = new Cuid2;queue_application_deployment(application: $application,@@ -1025,7 +1025,7 @@ class ApplicationsController extends Controller]));} elseif ($type === 'dockerimage') {if (! $request->has('name')) {- $request->offsetSet('name', 'docker-image-'.new Cuid2());+ $request->offsetSet('name', 'docker-image-'.new Cuid2);}$validator = customApiValidator($request->all(), [sharedDataApplications(),@@ -1067,7 +1067,7 @@ class ApplicationsController extends Controller$application->isConfigurationChanged(true);if ($instantDeploy) {- $deployment_uuid = new Cuid2();+ $deployment_uuid = new Cuid2;queue_application_deployment(application: $application,@@ -1099,7 +1099,7 @@ class ApplicationsController extends Controller], 422);}if (! $request->has('name')) {- $request->offsetSet('name', 'service'.new Cuid2());+ $request->offsetSet('name', 'service'.new Cuid2);}$validator = customApiValidator($request->all(), [sharedDataApplications(),@@ -2322,7 +2322,7 @@ class ApplicationsController extends Controllerreturn response()->json(['message' => 'Application not found.'], 404);}- $deployment_uuid = new Cuid2();+ $deployment_uuid = new Cuid2;queue_application_deployment(application: $application,@@ -2479,7 +2479,7 @@ class ApplicationsController extends Controllerreturn response()->json(['message' => 'Application not found.'], 404);}- $deployment_uuid = new Cuid2();+ $deployment_uuid = new Cuid2;queue_application_deployment(application: $application,diff --git a/app/Http/Controllers/Api/DeployController.php b/app/Http/Controllers/Api/DeployController.phpindex 838d42df5f..437162058e 100644--- a/app/Http/Controllers/Api/DeployController.php+++ b/app/Http/Controllers/Api/DeployController.php@@ -290,7 +290,7 @@ class DeployController extends Controller}switch ($resource?->getMorphClass()) {case 'App\Models\Application':- $deployment_uuid = new Cuid2();+ $deployment_uuid = new Cuid2;queue_application_deployment(application: $resource,deployment_uuid: $deployment_uuid,diff --git a/app/Http/Controllers/Webhook/Bitbucket.php b/app/Http/Controllers/Webhook/Bitbucket.phpindex 720bf85bb5..ef85d59e3c 100644--- a/app/Http/Controllers/Webhook/Bitbucket.php+++ b/app/Http/Controllers/Webhook/Bitbucket.php@@ -103,7 +103,7 @@ class Bitbucket extends Controllerif ($x_bitbucket_event === 'repo:push') {if ($application->isDeployable()) {ray('Deploying '.$application->name.' with branch '.$branch);- $deployment_uuid = new Cuid2();+ $deployment_uuid = new Cuid2;queue_application_deployment(application: $application,deployment_uuid: $deployment_uuid,@@ -127,7 +127,7 @@ class Bitbucket extends Controllerif ($x_bitbucket_event === 'pullrequest:created') {if ($application->isPRDeployable()) {ray('Deploying preview for '.$application->name.' with branch '.$branch.' and base branch '.$base_branch.' and pull request id '.$pull_request_id);- $deployment_uuid = new Cuid2();+ $deployment_uuid = new Cuid2;$found = ApplicationPreview::where('application_id', $application->id)->where('pull_request_id', $pull_request_id)->first();if (! $found) {if ($application->build_pack === 'dockercompose') {diff --git a/app/Http/Controllers/Webhook/Gitea.php b/app/Http/Controllers/Webhook/Gitea.phpindex 26ba7a0e29..e042b74c9a 100644--- a/app/Http/Controllers/Webhook/Gitea.php+++ b/app/Http/Controllers/Webhook/Gitea.php@@ -123,7 +123,7 @@ class Gitea extends Controller$is_watch_path_triggered = $application->isWatchPathsTriggered($changed_files);if ($is_watch_path_triggered || is_null($application->watch_paths)) {ray('Deploying '.$application->name.' with branch '.$branch);- $deployment_uuid = new Cuid2();+ $deployment_uuid = new Cuid2;queue_application_deployment(application: $application,deployment_uuid: $deployment_uuid,@@ -162,7 +162,7 @@ class Gitea extends Controllerif ($x_gitea_event === 'pull_request') {if ($action === 'opened' || $action === 'synchronize' || $action === 'reopened') {if ($application->isPRDeployable()) {- $deployment_uuid = new Cuid2();+ $deployment_uuid = new Cuid2;$found = ApplicationPreview::where('application_id', $application->id)->where('pull_request_id', $pull_request_id)->first();if (! $found) {if ($application->build_pack === 'dockercompose') {diff --git a/app/Http/Controllers/Webhook/Github.php b/app/Http/Controllers/Webhook/Github.phpindex 56af8644f8..5f3ba933bd 100644--- a/app/Http/Controllers/Webhook/Github.php+++ b/app/Http/Controllers/Webhook/Github.php@@ -128,7 +128,7 @@ class Github extends Controller$is_watch_path_triggered = $application->isWatchPathsTriggered($changed_files);if ($is_watch_path_triggered || is_null($application->watch_paths)) {ray('Deploying '.$application->name.' with branch '.$branch);- $deployment_uuid = new Cuid2();+ $deployment_uuid = new Cuid2;queue_application_deployment(application: $application,deployment_uuid: $deployment_uuid,@@ -167,7 +167,7 @@ class Github extends Controllerif ($x_github_event === 'pull_request') {if ($action === 'opened' || $action === 'synchronize' || $action === 'reopened') {if ($application->isPRDeployable()) {- $deployment_uuid = new Cuid2();+ $deployment_uuid = new Cuid2;$found = ApplicationPreview::where('application_id', $application->id)->where('pull_request_id', $pull_request_id)->first();if (! $found) {if ($application->build_pack === 'dockercompose') {@@ -357,7 +357,7 @@ class Github extends Controller$is_watch_path_triggered = $application->isWatchPathsTriggered($changed_files);if ($is_watch_path_triggered || is_null($application->watch_paths)) {ray('Deploying '.$application->name.' with branch '.$branch);- $deployment_uuid = new Cuid2();+ $deployment_uuid = new Cuid2;queue_application_deployment(application: $application,deployment_uuid: $deployment_uuid,@@ -396,7 +396,7 @@ class Github extends Controllerif ($x_github_event === 'pull_request') {if ($action === 'opened' || $action === 'synchronize' || $action === 'reopened') {if ($application->isPRDeployable()) {- $deployment_uuid = new Cuid2();+ $deployment_uuid = new Cuid2;$found = ApplicationPreview::where('application_id', $application->id)->where('pull_request_id', $pull_request_id)->first();if (! $found) {ApplicationPreview::create([diff --git a/app/Http/Controllers/Webhook/Gitlab.php b/app/Http/Controllers/Webhook/Gitlab.phpindex ad0142a641..ec7f51a0d7 100644--- a/app/Http/Controllers/Webhook/Gitlab.php+++ b/app/Http/Controllers/Webhook/Gitlab.php@@ -137,7 +137,7 @@ class Gitlab extends Controller$is_watch_path_triggered = $application->isWatchPathsTriggered($changed_files);if ($is_watch_path_triggered || is_null($application->watch_paths)) {ray('Deploying '.$application->name.' with branch '.$branch);- $deployment_uuid = new Cuid2();+ $deployment_uuid = new Cuid2;queue_application_deployment(application: $application,deployment_uuid: $deployment_uuid,@@ -177,7 +177,7 @@ class Gitlab extends Controllerif ($x_gitlab_event === 'merge_request') {if ($action === 'open' || $action === 'opened' || $action === 'synchronize' || $action === 'reopened' || $action === 'reopen' || $action === 'update') {if ($application->isPRDeployable()) {- $deployment_uuid = new Cuid2();+ $deployment_uuid = new Cuid2;$found = ApplicationPreview::where('application_id', $application->id)->where('pull_request_id', $pull_request_id)->first();if (! $found) {if ($application->build_pack === 'dockercompose') {diff --git a/app/Livewire/Destination/New/Docker.php b/app/Livewire/Destination/New/Docker.phpindex 2238be22d9..4fc938df84 100644--- a/app/Livewire/Destination/New/Docker.php+++ b/app/Livewire/Destination/New/Docker.php@@ -52,7 +52,7 @@ class Docker extends Componentif (request()->query('network_name')) {$this->network = request()->query('network_name');} else {- $this->network = new Cuid2();+ $this->network = new Cuid2;}if ($this->servers->count() > 0) {$this->name = str("{$this->servers->first()->name}-{$this->network}")->kebab();diff --git a/app/Livewire/MonacoEditor.php b/app/Livewire/MonacoEditor.phpindex 52b501f18f..42d276e643 100644--- a/app/Livewire/MonacoEditor.php+++ b/app/Livewire/MonacoEditor.php@@ -39,7 +39,7 @@ class MonacoEditor extends Componentpublic function render(){if (is_null($this->id)) {- $this->id = new Cuid2();+ $this->id = new Cuid2;}if (is_null($this->name)) {diff --git a/app/Livewire/Project/Application/General.php b/app/Livewire/Project/Application/General.phpindex b201f9c389..395c455246 100644--- a/app/Livewire/Project/Application/General.php+++ b/app/Livewire/Project/Application/General.php@@ -228,7 +228,7 @@ class General extends Componentpublic function generateDomain(string $serviceName){- $uuid = new Cuid2();+ $uuid = new Cuid2;$domain = generateFqdn($this->application->destination->server, $uuid);$this->parsedServiceDomains[$serviceName]['domain'] = $domain;$this->application->docker_compose_domains = json_encode($this->parsedServiceDomains);diff --git a/app/Livewire/Project/Application/Heading.php b/app/Livewire/Project/Application/Heading.phpindex 415b44ed4f..b5f01587a1 100644--- a/app/Livewire/Project/Application/Heading.php+++ b/app/Livewire/Project/Application/Heading.php@@ -102,7 +102,7 @@ class Heading extends Componentprotected function setDeploymentUuid(){- $this->deploymentUuid = new Cuid2();+ $this->deploymentUuid = new Cuid2;$this->parameters['deployment_uuid'] = $this->deploymentUuid;}diff --git a/app/Livewire/Project/Application/Previews.php b/app/Livewire/Project/Application/Previews.phpindex 36838d3a59..30bc0a9d12 100644--- a/app/Livewire/Project/Application/Previews.php+++ b/app/Livewire/Project/Application/Previews.php@@ -85,7 +85,7 @@ class Previews extends Component$template = $this->application->preview_url_template;$host = $url->getHost();$schema = $url->getScheme();- $random = new Cuid2();+ $random = new Cuid2;$preview_fqdn = str_replace('{{random}}', $random, $template);$preview_fqdn = str_replace('{{domain}}', $host, $preview_fqdn);$preview_fqdn = str_replace('{{pr_id}}', $preview->pull_request_id, $preview_fqdn);@@ -170,7 +170,7 @@ class Previews extends Componentprotected function setDeploymentUuid(){- $this->deployment_uuid = new Cuid2();+ $this->deployment_uuid = new Cuid2;$this->parameters['deployment_uuid'] = $this->deployment_uuid;}diff --git a/app/Livewire/Project/Application/PreviewsCompose.php b/app/Livewire/Project/Application/PreviewsCompose.phpindex 2cb8fd6cfb..b3e838bb3f 100644--- a/app/Livewire/Project/Application/PreviewsCompose.php+++ b/app/Livewire/Project/Application/PreviewsCompose.php@@ -44,7 +44,7 @@ class PreviewsCompose extends Component$template = $this->preview->application->preview_url_template;$host = $url->getHost();$schema = $url->getScheme();- $random = new Cuid2();+ $random = new Cuid2;$preview_fqdn = str_replace('{{random}}', $random, $template);$preview_fqdn = str_replace('{{domain}}', $host, $preview_fqdn);$preview_fqdn = str_replace('{{pr_id}}', $this->preview->pull_request_id, $preview_fqdn);diff --git a/app/Livewire/Project/Application/Rollback.php b/app/Livewire/Project/Application/Rollback.phpindex a9a4d27680..1e58a14586 100644--- a/app/Livewire/Project/Application/Rollback.php+++ b/app/Livewire/Project/Application/Rollback.php@@ -23,7 +23,7 @@ class Rollback extends Componentpublic function rollbackImage($commit){- $deployment_uuid = new Cuid2();+ $deployment_uuid = new Cuid2;queue_application_deployment(application: $this->application,diff --git a/app/Livewire/Project/CloneMe.php b/app/Livewire/Project/CloneMe.phpindex daa766828d..4d2bc65891 100644--- a/app/Livewire/Project/CloneMe.php+++ b/app/Livewire/Project/CloneMe.php@@ -47,7 +47,7 @@ class CloneMe extends Component$this->environment = $this->project->environments->where('name', $this->environment_name)->first();$this->project_id = $this->project->id;$this->servers = currentTeam()->servers;- $this->newName = str($this->project->name.'-clone-'.(string) new Cuid2())->slug();+ $this->newName = str($this->project->name.'-clone-'.(string) new Cuid2)->slug();}public function render()@@ -106,7 +106,7 @@ class CloneMe extends Component$databases = $this->environment->databases();$services = $this->environment->services;foreach ($applications as $application) {- $uuid = (string) new Cuid2();+ $uuid = (string) new Cuid2;$newApplication = $application->replicate()->fill(['uuid' => $uuid,'fqdn' => generateFqdn($this->server, $uuid),@@ -133,7 +133,7 @@ class CloneMe extends Component}}foreach ($databases as $database) {- $uuid = (string) new Cuid2();+ $uuid = (string) new Cuid2;$newDatabase = $database->replicate()->fill(['uuid' => $uuid,'status' => 'exited',@@ -161,7 +161,7 @@ class CloneMe extends Component}}foreach ($services as $service) {- $uuid = (string) new Cuid2();+ $uuid = (string) new Cuid2;$newService = $service->replicate()->fill(['uuid' => $uuid,'environment_id' => $environment->id,diff --git a/app/Livewire/Project/New/DockerImage.php b/app/Livewire/Project/New/DockerImage.phpindex 2fa48ad7af..d3f5b5261e 100644--- a/app/Livewire/Project/New/DockerImage.php+++ b/app/Livewire/Project/New/DockerImage.php@@ -48,7 +48,7 @@ class DockerImage extends Component$environment = $project->load(['environments'])->environments->where('name', $this->parameters['environment_name'])->first();ray($image, $tag);$application = Application::create([- 'name' => 'docker-image-'.new Cuid2(),+ 'name' => 'docker-image-'.new Cuid2,'repository_project_id' => 0,'git_repository' => 'coollabsio/coolify','git_branch' => 'main',diff --git a/app/Livewire/Project/New/SimpleDockerfile.php b/app/Livewire/Project/New/SimpleDockerfile.phpindex 883b629fa2..3c7f42329e 100644--- a/app/Livewire/Project/New/SimpleDockerfile.php+++ b/app/Livewire/Project/New/SimpleDockerfile.php@@ -53,7 +53,7 @@ CMD ["nginx", "-g", "daemon off;"]$port = 80;}$application = Application::create([- 'name' => 'dockerfile-'.new Cuid2(),+ 'name' => 'dockerfile-'.new Cuid2,'repository_project_id' => 0,'git_repository' => 'coollabsio/coolify','git_branch' => 'main',diff --git a/app/Livewire/Project/Shared/Danger.php b/app/Livewire/Project/Shared/Danger.phpindex 839d6d89e0..5f0178be40 100644--- a/app/Livewire/Project/Shared/Danger.php+++ b/app/Livewire/Project/Shared/Danger.php@@ -22,7 +22,7 @@ class Danger extends Componentpublic function mount(){- $this->modalId = new Cuid2();+ $this->modalId = new Cuid2;$parameters = get_route_parameters();$this->projectUuid = data_get($parameters, 'project_uuid');$this->environmentName = data_get($parameters, 'environment_name');diff --git a/app/Livewire/Project/Shared/Destination.php b/app/Livewire/Project/Shared/Destination.phpindex b2528e0761..a2c018beb1 100644--- a/app/Livewire/Project/Shared/Destination.php+++ b/app/Livewire/Project/Shared/Destination.php@@ -67,7 +67,7 @@ class Destination extends Componentreturn;}- $deployment_uuid = new Cuid2();+ $deployment_uuid = new Cuid2;$server = Server::find($server_id);$destination = StandaloneDocker::find($network_id);queue_application_deployment(diff --git a/app/Livewire/Project/Shared/EnvironmentVariable/All.php b/app/Livewire/Project/Shared/EnvironmentVariable/All.phpindex b7660aa614..5fceda8089 100644--- a/app/Livewire/Project/Shared/EnvironmentVariable/All.php+++ b/app/Livewire/Project/Shared/EnvironmentVariable/All.php@@ -39,7 +39,7 @@ class All extends Componentif (str($this->resourceClass)->contains($resourceWithPreviews) && ! $simpleDockerfile) {$this->showPreview = true;}- $this->modalId = new Cuid2();+ $this->modalId = new Cuid2;$this->sortMe();$this->getDevView();}diff --git a/app/Livewire/Project/Shared/EnvironmentVariable/Show.php b/app/Livewire/Project/Shared/EnvironmentVariable/Show.phpindex 279c809f3c..8c8c1be7bc 100644--- a/app/Livewire/Project/Shared/EnvironmentVariable/Show.php+++ b/app/Livewire/Project/Shared/EnvironmentVariable/Show.php@@ -51,7 +51,7 @@ class Show extends Componentif ($this->env->getMorphClass() === 'App\Models\SharedEnvironmentVariable') {$this->isSharedVariable = true;}- $this->modalId = new Cuid2();+ $this->modalId = new Cuid2;$this->parameters = get_route_parameters();$this->checkEnvs();}diff --git a/app/Livewire/Project/Shared/ResourceOperations.php b/app/Livewire/Project/Shared/ResourceOperations.phpindex 466104d24b..ec09eb80fa 100644--- a/app/Livewire/Project/Shared/ResourceOperations.php+++ b/app/Livewire/Project/Shared/ResourceOperations.php@@ -39,7 +39,7 @@ class ResourceOperations extends Componentif (! $new_destination) {return $this->addError('destination_id', 'Destination not found.');}- $uuid = (string) new Cuid2();+ $uuid = (string) new Cuid2;$server = $new_destination->server;if ($this->resource->getMorphClass() === 'App\Models\Application') {$new_resource = $this->resource->replicate()->fill([@@ -87,7 +87,7 @@ class ResourceOperations extends Component$this->resource->getMorphClass() === 'App\Models\StandaloneDragonfly' ||$this->resource->getMorphClass() === 'App\Models\StandaloneClickhouse') {- $uuid = (string) new Cuid2();+ $uuid = (string) new Cuid2;$new_resource = $this->resource->replicate()->fill(['uuid' => $uuid,'name' => $this->resource->name.'-clone-'.$uuid,@@ -121,7 +121,7 @@ class ResourceOperations extends Componentreturn redirect()->to($route);} elseif ($this->resource->type() === 'service') {- $uuid = (string) new Cuid2();+ $uuid = (string) new Cuid2;$new_resource = $this->resource->replicate()->fill(['uuid' => $uuid,'name' => $this->resource->name.'-clone-'.$uuid,diff --git a/app/Livewire/Project/Shared/ScheduledTask/Show.php b/app/Livewire/Project/Shared/ScheduledTask/Show.phpindex c1b2bc9893..8be4ff643f 100644--- a/app/Livewire/Project/Shared/ScheduledTask/Show.php+++ b/app/Livewire/Project/Shared/ScheduledTask/Show.php@@ -47,7 +47,7 @@ class Show extends Component$this->resource = Service::where('uuid', $this->parameters['service_uuid'])->firstOrFail();}- $this->modalId = new Cuid2();+ $this->modalId = new Cuid2;$this->task = ModelsScheduledTask::where('uuid', request()->route('task_uuid'))->first();}diff --git a/app/Models/Application.php b/app/Models/Application.phpindex 63fae03b6b..f13805ad56 100644--- a/app/Models/Application.php+++ b/app/Models/Application.php@@ -1282,7 +1282,7 @@ class Application extends BaseModel$template = $this->preview_url_template;$host = $url->getHost();$schema = $url->getScheme();- $random = new Cuid2();+ $random = new Cuid2;$preview_fqdn = str_replace('{{random}}', $random, $template);$preview_fqdn = str_replace('{{domain}}', $host, $preview_fqdn);$preview_fqdn = str_replace('{{pr_id}}', $pull_request_id, $preview_fqdn);diff --git a/app/Models/ApplicationPreview.php b/app/Models/ApplicationPreview.phpindex 8f5b6d000d..2825f984f3 100644--- a/app/Models/ApplicationPreview.php+++ b/app/Models/ApplicationPreview.php@@ -49,7 +49,7 @@ class ApplicationPreview extends BaseModel$template = $this->application->preview_url_template;$host = $url->getHost();$schema = $url->getScheme();- $random = new Cuid2();+ $random = new Cuid2;$preview_fqdn = str_replace('{{random}}', $random, $template);$preview_fqdn = str_replace('{{domain}}', $host, $preview_fqdn);$preview_fqdn = str_replace('{{pr_id}}', $this->pull_request_id, $preview_fqdn);diff --git a/app/Models/BaseModel.php b/app/Models/BaseModel.phpindex d29328f077..17201ea6e4 100644--- a/app/Models/BaseModel.php+++ b/app/Models/BaseModel.php@@ -14,7 +14,7 @@ abstract class BaseModel extends Modelstatic::creating(function (Model $model) {// Generate a UUID if one isn't setif (! $model->uuid) {- $model->uuid = (string) new Cuid2();+ $model->uuid = (string) new Cuid2;}});}diff --git a/app/View/Components/Forms/Datalist.php b/app/View/Components/Forms/Datalist.phpindex 742d5a005c..25643753d7 100644--- a/app/View/Components/Forms/Datalist.php+++ b/app/View/Components/Forms/Datalist.php@@ -30,7 +30,7 @@ class Datalist extends Componentpublic function render(): View|Closure|string{if (is_null($this->id)) {- $this->id = new Cuid2();+ $this->id = new Cuid2;}if (is_null($this->name)) {$this->name = $this->id;diff --git a/app/View/Components/Forms/Input.php b/app/View/Components/Forms/Input.phpindex 017049e285..6c9378cacd 100644--- a/app/View/Components/Forms/Input.php+++ b/app/View/Components/Forms/Input.php@@ -27,7 +27,7 @@ class Input extends Componentpublic function render(): View|Closure|string{if (is_null($this->id)) {- $this->id = new Cuid2();+ $this->id = new Cuid2;}if (is_null($this->name)) {$this->name = $this->id;diff --git a/app/View/Components/Forms/Select.php b/app/View/Components/Forms/Select.phpindex 33d1c86a0f..dd5ba66b7d 100644--- a/app/View/Components/Forms/Select.php+++ b/app/View/Components/Forms/Select.php@@ -30,7 +30,7 @@ class Select extends Componentpublic function render(): View|Closure|string{if (is_null($this->id)) {- $this->id = new Cuid2();+ $this->id = new Cuid2;}if (is_null($this->name)) {$this->name = $this->id;diff --git a/app/View/Components/Forms/Textarea.php b/app/View/Components/Forms/Textarea.phpindex ca80fc197a..3f887877c2 100644--- a/app/View/Components/Forms/Textarea.php+++ b/app/View/Components/Forms/Textarea.php@@ -41,7 +41,7 @@ class Textarea extends Componentpublic function render(): View|Closure|string{if (is_null($this->id)) {- $this->id = new Cuid2();+ $this->id = new Cuid2;}if (is_null($this->name)) {$this->name = $this->id;diff --git a/bootstrap/helpers/databases.php b/bootstrap/helpers/databases.phpindex 0e7ce9dbc6..b8dcc1f3c1 100644--- a/bootstrap/helpers/databases.php+++ b/bootstrap/helpers/databases.php@@ -14,7 +14,7 @@ use Visus\Cuid2\Cuid2;function generate_database_name(string $type): string{- $cuid = new Cuid2();+ $cuid = new Cuid2;return $type.'-database-'.$cuid;}diff --git a/bootstrap/helpers/docker.php b/bootstrap/helpers/docker.phpindex 14460ac506..f32100f881 100644--- a/bootstrap/helpers/docker.php+++ b/bootstrap/helpers/docker.php@@ -338,7 +338,7 @@ function fqdnLabelsForTraefik(string $uuid, Collection $domains, bool $is_force_foreach ($domains as $loop => $domain) {try {if ($generate_unique_uuid) {- $uuid = new Cuid2();+ $uuid = new Cuid2;}$url = Url::fromString($domain);diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.phpindex f722b544c1..9c2b1fcb56 100644--- a/bootstrap/helpers/shared.php+++ b/bootstrap/helpers/shared.php@@ -200,7 +200,7 @@ function generate_random_name(?string $cuid = null): string]);if (is_null($cuid)) {- $cuid = new Cuid2();+ $cuid = new Cuid2;}return Str::kebab("{$generator->getName()}-$cuid");@@ -236,7 +236,7 @@ function formatPrivateKey(string $privateKey)function generate_application_name(string $git_repository, string $git_branch, ?string $cuid = null): string{if (is_null($cuid)) {- $cuid = new Cuid2();+ $cuid = new Cuid2;}return Str::kebab("$git_repository:$git_branch-$cuid");@@ -2015,7 +2015,7 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal$template = $resource->preview_url_template;$host = $url->getHost();$schema = $url->getScheme();- $random = new Cuid2();+ $random = new Cuid2;$preview_fqdn = str_replace('{{random}}', $random, $template);$preview_fqdn = str_replace('{{domain}}', $host, $preview_fqdn);$preview_fqdn = str_replace('{{pr_id}}', $pull_request_id, $preview_fqdn);