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
Refactor code to load tags for environment applications and databases
Andras Bacsai0b518a3b767d
diff --git a/app/Livewire/Project/Resource/Index.php b/app/Livewire/Project/Resource/Index.phpindex 5f1753c9ed..9e0a5e9db0 100644--- a/app/Livewire/Project/Resource/Index.php+++ b/app/Livewire/Project/Resource/Index.php@@ -29,7 +29,8 @@ class Index extends Component}$this->project = $project;$this->environment = $environment;- $this->applications = $environment->applications->load(['tags']);++ $this->applications = $this->environment->applications->load(['tags']);$this->applications = $this->applications->map(function ($application) {if (data_get($application, 'environment.project.uuid')) {$application->hrefLink = route('project.application.configuration', [@@ -40,8 +41,7 @@ class Index extends Component}return $application;});- ray($this->applications);- $this->postgresqls = $environment->postgresqls->load(['tags'])->sortBy('name');+ $this->postgresqls = $this->environment->postgresqls->load(['tags'])->sortBy('name');$this->postgresqls = $this->postgresqls->map(function ($postgresql) {if (data_get($postgresql, 'environment.project.uuid')) {$postgresql->hrefLink = route('project.database.configuration', [@@ -52,7 +52,7 @@ class Index extends Component}return $postgresql;});- $this->redis = $environment->redis->load(['tags'])->sortBy('name');+ $this->redis = $this->environment->redis->load(['tags'])->sortBy('name');$this->redis = $this->redis->map(function ($redis) {if (data_get($redis, 'environment.project.uuid')) {$redis->hrefLink = route('project.database.configuration', [@@ -63,7 +63,7 @@ class Index extends Component}return $redis;});- $this->mongodbs = $environment->mongodbs->load(['tags'])->sortBy('name');+ $this->mongodbs = $this->environment->mongodbs->load(['tags'])->sortBy('name');$this->mongodbs = $this->mongodbs->map(function ($mongodb) {if (data_get($mongodb, 'environment.project.uuid')) {$mongodb->hrefLink = route('project.database.configuration', [@@ -74,7 +74,7 @@ class Index extends Component}return $mongodb;});- $this->mysqls = $environment->mysqls->load(['tags'])->sortBy('name');+ $this->mysqls = $this->environment->mysqls->load(['tags'])->sortBy('name');$this->mysqls = $this->mysqls->map(function ($mysql) {if (data_get($mysql, 'environment.project.uuid')) {$mysql->hrefLink = route('project.database.configuration', [@@ -85,7 +85,7 @@ class Index extends Component}return $mysql;});- $this->mariadbs = $environment->mariadbs->load(['tags'])->sortBy('name');+ $this->mariadbs = $this->environment->mariadbs->load(['tags'])->sortBy('name');$this->mariadbs = $this->mariadbs->map(function ($mariadb) {if (data_get($mariadb, 'environment.project.uuid')) {$mariadb->hrefLink = route('project.database.configuration', [@@ -96,7 +96,7 @@ class Index extends Component}return $mariadb;});- $this->services = $environment->services->load(['tags'])->sortBy('name');+ $this->services = $this->environment->services->load(['tags'])->sortBy('name');$this->services = $this->services->map(function ($service) {if (data_get($service, 'environment.project.uuid')) {$service->hrefLink = route('project.service.configuration', [diff --git a/app/Models/StandaloneMariadb.php b/app/Models/StandaloneMariadb.phpindex 4d56f11a36..18c36203eb 100644--- a/app/Models/StandaloneMariadb.php+++ b/app/Models/StandaloneMariadb.php@@ -10,7 +10,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;class StandaloneMariadb extends BaseModel{- use HasFactory,SoftDeletes;+ use HasFactory, SoftDeletes;protected $guarded = [];protected $casts = [