@@ -55,12 +55,17 @@ class All extends Component
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
        if ($isPreview) {
 | 
					        if ($isPreview) {
 | 
				
			||||||
            $variables = parseEnvFormatToArray($this->variablesPreview);
 | 
					            $variables = parseEnvFormatToArray($this->variablesPreview);
 | 
				
			||||||
 | 
					            $this->resource->environment_variables_preview()->whereNotIn('key', array_keys($variables))->delete();
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            $variables = parseEnvFormatToArray($this->variables);
 | 
					            $variables = parseEnvFormatToArray($this->variables);
 | 
				
			||||||
 | 
					            $this->resource->environment_variables()->whereNotIn('key', array_keys($variables))->delete();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        foreach ($variables as $key => $variable) {
 | 
					        foreach ($variables as $key => $variable) {
 | 
				
			||||||
 | 
					            if ($isPreview) {
 | 
				
			||||||
 | 
					                $found = $this->resource->environment_variables_preview()->where('key', $key)->first();
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
                $found = $this->resource->environment_variables()->where('key', $key)->first();
 | 
					                $found = $this->resource->environment_variables()->where('key', $key)->first();
 | 
				
			||||||
            $foundPreview = $this->resource->environment_variables_preview()->where('key', $key)->first();
 | 
					            }
 | 
				
			||||||
            if ($found) {
 | 
					            if ($found) {
 | 
				
			||||||
                if ($found->is_shown_once) {
 | 
					                if ($found->is_shown_once) {
 | 
				
			||||||
                    continue;
 | 
					                    continue;
 | 
				
			||||||
@@ -68,14 +73,6 @@ class All extends Component
 | 
				
			|||||||
                $found->value = $variable;
 | 
					                $found->value = $variable;
 | 
				
			||||||
                $found->save();
 | 
					                $found->save();
 | 
				
			||||||
                continue;
 | 
					                continue;
 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            if ($foundPreview) {
 | 
					 | 
				
			||||||
                if ($foundPreview->is_shown_once) {
 | 
					 | 
				
			||||||
                    continue;
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
                $foundPreview->value = $variable;
 | 
					 | 
				
			||||||
                $foundPreview->save();
 | 
					 | 
				
			||||||
                continue;
 | 
					 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
                $environment = new EnvironmentVariable();
 | 
					                $environment = new EnvironmentVariable();
 | 
				
			||||||
                $environment->key = $key;
 | 
					                $environment->key = $key;
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										743
									
								
								composer.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										743
									
								
								composer.lock
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -7,7 +7,7 @@ return [
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    // The release version of your application
 | 
					    // The release version of your application
 | 
				
			||||||
    // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
 | 
					    // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
 | 
				
			||||||
    'release' => '4.0.0-beta.117',
 | 
					    'release' => '4.0.0-beta.118',
 | 
				
			||||||
    // When left empty or `null` the Laravel environment will be used
 | 
					    // When left empty or `null` the Laravel environment will be used
 | 
				
			||||||
    'environment' => config('app.env'),
 | 
					    'environment' => config('app.env'),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,3 +1,3 @@
 | 
				
			|||||||
<?php
 | 
					<?php
 | 
				
			||||||
 | 
					
 | 
				
			||||||
return '4.0.0-beta.117';
 | 
					return '4.0.0-beta.118';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@
 | 
				
			|||||||
            "version": "3.12.36"
 | 
					            "version": "3.12.36"
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        "v4": {
 | 
					        "v4": {
 | 
				
			||||||
            "version": "4.0.0-beta.117"
 | 
					            "version": "4.0.0-beta.118"
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user