feat: preselect prod or first env when selecting a project
feat: quickly switch between environments
This commit is contained in:
@@ -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