init: redis
This commit is contained in:
@@ -14,7 +14,7 @@ class Environment extends Model
|
||||
|
||||
public function can_delete_environment()
|
||||
{
|
||||
return $this->applications()->count() == 0 && $this->postgresqls()->count() == 0 && $this->services()->count() == 0;
|
||||
return $this->applications()->count() == 0 && $this->redis()->count() == 0 && $this->postgresqls()->count() == 0 && $this->services()->count() == 0;
|
||||
}
|
||||
|
||||
public function applications()
|
||||
@@ -26,10 +26,16 @@ class Environment extends Model
|
||||
{
|
||||
return $this->hasMany(StandalonePostgresql::class);
|
||||
}
|
||||
public function redis()
|
||||
{
|
||||
return $this->hasMany(StandaloneRedis::class);
|
||||
}
|
||||
|
||||
public function databases()
|
||||
{
|
||||
return $this->postgresqls();
|
||||
$postgresqls = $this->postgresqls;
|
||||
$redis = $this->redis;
|
||||
return $postgresqls->concat($redis);
|
||||
}
|
||||
|
||||
public function project()
|
||||
|
||||
Reference in New Issue
Block a user