testing php storm code cleanup and styling
This commit is contained in:
@@ -23,10 +23,12 @@ class Add extends Component
|
||||
'value' => 'value',
|
||||
'is_build_time' => 'build',
|
||||
];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->parameters = getRouteParameters();
|
||||
}
|
||||
|
||||
public function submit()
|
||||
{
|
||||
ray('submitting');
|
||||
@@ -39,6 +41,7 @@ class Add extends Component
|
||||
]);
|
||||
$this->clear();
|
||||
}
|
||||
|
||||
public function clear()
|
||||
{
|
||||
$this->key = '';
|
||||
|
||||
@@ -11,14 +11,17 @@ class All extends Component
|
||||
public $resource;
|
||||
public string|null $modalId = null;
|
||||
protected $listeners = ['refreshEnvs', 'submit'];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->modalId = new Cuid2(7);
|
||||
}
|
||||
|
||||
public function refreshEnvs()
|
||||
{
|
||||
$this->resource->refresh();
|
||||
}
|
||||
|
||||
public function submit($data)
|
||||
{
|
||||
try {
|
||||
@@ -27,16 +30,16 @@ class All extends Component
|
||||
$this->emit('error', 'Environment variable already exists.');
|
||||
return;
|
||||
}
|
||||
$environment = new EnvironmentVariable();
|
||||
$environment = new EnvironmentVariable();
|
||||
$environment->key = $data['key'];
|
||||
$environment->value = $data['value'];
|
||||
$environment->is_build_time = $data['is_build_time'];
|
||||
$environment->is_preview = $data['is_preview'];
|
||||
|
||||
if($this->resource->type() === 'application') {
|
||||
if ($this->resource->type() === 'application') {
|
||||
$environment->application_id = $this->resource->id;
|
||||
}
|
||||
if($this->resource->type() === 'standalone-postgresql') {
|
||||
if ($this->resource->type() === 'standalone-postgresql') {
|
||||
$environment->standalone_postgresql_id = $this->resource->id;
|
||||
}
|
||||
$environment->save();
|
||||
|
||||
@@ -21,17 +21,20 @@ class Show extends Component
|
||||
'value' => 'value',
|
||||
'is_build_time' => 'build',
|
||||
];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->modalId = new Cuid2(7);
|
||||
$this->parameters = getRouteParameters();
|
||||
}
|
||||
|
||||
public function submit()
|
||||
{
|
||||
$this->validate();
|
||||
$this->env->save();
|
||||
$this->emit('success', 'Environment variable updated successfully.');
|
||||
}
|
||||
|
||||
public function delete()
|
||||
{
|
||||
$this->env->delete();
|
||||
|
||||
Reference in New Issue
Block a user