From 79f3b7c4b85fa295a57aed1fab4a5801f93c9a34 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 27 Mar 2023 20:45:32 +0200 Subject: [PATCH] Fix --- app/Http/Livewire/TemporaryCheckStatus.php | 19 ------------------- app/Models/Database.php | 2 +- database/seeders/EnvironmentSeeder.php | 5 +++++ resources/views/home.blade.php | 12 +++++------- .../livewire/temporary-check-status.blade.php | 3 --- 5 files changed, 11 insertions(+), 30 deletions(-) delete mode 100644 app/Http/Livewire/TemporaryCheckStatus.php delete mode 100644 resources/views/livewire/temporary-check-status.blade.php diff --git a/app/Http/Livewire/TemporaryCheckStatus.php b/app/Http/Livewire/TemporaryCheckStatus.php deleted file mode 100644 index eeba96325..000000000 --- a/app/Http/Livewire/TemporaryCheckStatus.php +++ /dev/null @@ -1,19 +0,0 @@ -environment); - } - public function render() - { - return view('livewire.temporary-check-status'); - } -} diff --git a/app/Models/Database.php b/app/Models/Database.php index f9bb633b9..ab0476d27 100644 --- a/app/Models/Database.php +++ b/app/Models/Database.php @@ -6,7 +6,7 @@ class Database extends BaseModel { public function environment() { - return $this->morphTo(); + return $this->belongsTo(Environment::class); } public function destination() { diff --git a/database/seeders/EnvironmentSeeder.php b/database/seeders/EnvironmentSeeder.php index b06a70c5f..d3dfc8c63 100644 --- a/database/seeders/EnvironmentSeeder.php +++ b/database/seeders/EnvironmentSeeder.php @@ -20,5 +20,10 @@ public function run(): void 'name' => 'production', 'project_id' => $project_1->id, ]); + Environment::create([ + 'id' => 2, + 'name' => 'staging', + 'project_id' => $project_1->id, + ]); } } diff --git a/resources/views/home.blade.php b/resources/views/home.blade.php index 50f96bb4e..f76d0769b 100644 --- a/resources/views/home.blade.php +++ b/resources/views/home.blade.php @@ -2,26 +2,25 @@

Coolify v4 🎉

-

Projects

+

Projects