'required|string', 'storage.mount_path' => 'required|string', 'storage.host_path' => 'string|nullable', ]; protected $validationAttributes = [ 'name' => 'name', 'mount_path' => 'mount', 'host_path' => 'host', ]; public function submit() { $this->validate(); $this->storage->save(); $this->dispatch('success', 'Storage updated successfully'); } public function delete($password) { if (! data_get(InstanceSettings::get(), 'disable_two_step_confirmation')) { if (! Hash::check($password, Auth::user()->password)) { $this->addError('password', 'The provided password is incorrect.'); return; } } $this->storage->delete(); $this->dispatch('refreshStorages'); } }