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.
This commit is contained in:
parent
d7bee48735
commit
a39bd8c5b0
1 changed files with 6 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue