From a39bd8c5b064b228195893dc7a382ad2ff2a6ac4 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Tue, 7 Oct 2025 20:46:32 +0200 Subject: [PATCH] fix(project): update redirect logic after resource creation to include environment UUID - Modified the redirect route after project resource creation to include the UUID of the production environment, ensuring users are directed to the correct resource index page. - This change enhances navigation and improves user experience by providing direct access to the relevant environment resources. --- app/Livewire/Project/AddEmpty.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/Livewire/Project/AddEmpty.php b/app/Livewire/Project/AddEmpty.php index 751b4945b..974f0608a 100644 --- a/app/Livewire/Project/AddEmpty.php +++ b/app/Livewire/Project/AddEmpty.php @@ -37,7 +37,12 @@ public function submit() 'uuid' => (string) new Cuid2, ]); - return redirect()->route('project.show', $project->uuid); + $productionEnvironment = $project->environments()->where('name', 'production')->first(); + + return redirect()->route('project.resource.index', [ + 'project_uuid' => $project->uuid, + 'environment_uuid' => $productionEnvironment->uuid, + ]); } catch (\Throwable $e) { return handleError($e, $this); }