mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-12 16:15:17 +00:00
feat: preselect prod or first env when selecting a project
feat: quickly switch between environments
This commit is contained in:
1 parent
f607aa1233
commit
c5083ea897
5 files changed
+59
-2
No files matched your search
@@ -112,4 +112,14 @@ class Project extends BaseModel
|
||||
{
|
||||
return $this->postgresqls()->get()->merge($this->redis()->get())->merge($this->mongodbs()->get())->merge($this->mysqls()->get())->merge($this->mariadbs()->get())->merge($this->keydbs()->get())->merge($this->dragonflies()->get())->merge($this->clickhouses()->get());
|
||||
}
|
||||
|
||||
public function default_environment()
|
||||
{
|
||||
$default = $this->environments()->where('name', 'production')->first();
|
||||
if (! $default) {
|
||||
$default = $this->environments()->sortBy('created_at')->first();
|
||||
}
|
||||
|
||||
return $default;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user