我正在运行一个比特币投资网站。我希望在注册时给予用户0.005分的免费奖励。我已经尝试在注册控制器中跟随填充数据库表。它工作得很好但是在100用户之后它会创建某种类型的bug并且我在用户登录时遇到错误它说: 但我删除所有depostit表行,所有函数都能正常工作。
尝试获取非对象的属性
$user = User::create([
'name' => $data['name'],
'email' => $data['email'],
'under_reference' => $data['reference'],
'password' => bcrypt($data['password']),
'verifyToken' => Str::random(40),
'reference' => Str::random(12),
'status' => $status,
'image' => $image25
]);
$deposit = Deposit::create([
'deposit_number' => date('ymd').Str::random(6).rand(11,99),
'user_id' => $user->id,
'plan_id' => "7",
'percent' => "1",
'time' => "30",
'compound_id' => "2",
'amount' => "0.005",
'status' => "0"
]);