问题描述
我正在尝试运行将两个值“a”和“s”相乘的代码,并使用以下等式传播它们的错误:
Error Propagation of Multiplied Values
但是,当我运行代码时,我只得到显示最后一次迭代的输出,而我需要将从每次迭代中获得的每个不确定性值放入一个长度为 10 项的数组中。我不确定如何修复我的代码以获得所有迭代输出,有没有办法做到这一点?
这是我的代码和它的图片:
public $showUserUpdationModal = false;
public $role;
public User $user;
protected $rules = [
'user.name' => 'required|string|max:255','user.email' => 'required|string|email|max:255','role' => 'required',];
public function storeUser()
{
$this->validate();
$this->validate([
'user.email' => 'unique:users,email,'.$this->user->id,]);
$this->user->role()->associate($this->role);
$this->user->save();
$this->showUserUpdationModal = false;
$this->dispatchBrowserEvent('notify',$this->user->name.' Updated Successfully');
$this->emit('sectionRefresh');
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)