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(select-component): handle exceptions during parameter retrieval and environment selection in the mount method
Andras Bacsai32a14b005006
diff --git a/app/Livewire/Project/New/Select.php b/app/Livewire/Project/New/Select.phpindex ac07413d4b..4ad3b9b298 100644--- a/app/Livewire/Project/New/Select.php+++ b/app/Livewire/Project/New/Select.php@@ -57,13 +57,18 @@ class Select extends Componentpublic function mount(){- $this->parameters = get_route_parameters();- if (isDev()) {- $this->existingPostgresqlUrl = 'postgres://coolify:password@coolify-db:5432';+ try {+ $this->parameters = get_route_parameters();+ if (isDev()) {+ $this->existingPostgresqlUrl = 'postgres://coolify:password@coolify-db:5432';+ }+ $projectUuid = data_get($this->parameters, 'project_uuid');+ $project = Project::whereUuid($projectUuid)->firstOrFail();+ $this->environments = $project->environments;+ $this->selectedEnvironment = $this->environments->where('uuid', data_get($this->parameters, 'environment_uuid'))->firstOrFail()->name;+ } catch (\Exception $e) {+ return handleError($e, $this);}- $projectUuid = data_get($this->parameters, 'project_uuid');- $this->environments = Project::whereUuid($projectUuid)->first()->environments;- $this->selectedEnvironment = $this->environments->where('uuid', data_get($this->parameters, 'environment_uuid'))->first()->name;}public function render()