selectedEnvironment = request()->route('environment_name'); $this->project_uuid = request()->route('project_uuid'); } public function updatedSelectedEnvironment($value) { if ($value === 'edit') { return redirect()->route('project.show', [ 'project_uuid' => $this->project_uuid, ]); } else { return redirect()->route('project.resource.index', [ 'project_uuid' => $this->project_uuid, 'environment_name' => $value, ]); } } }