i want to insert data only in 3 rows .
i have tried
$currentBV = MemberExtra::where('user_id', $posid)->limit(3)->get();
but getting following error
"Property [left_b] does not exist on this collection instance
here is full code of function:
function updateDepositBV($id, $deposit_amount)
{
while($id !="" || $id != "0") {
if(isMemberExists($id))
{
$posid = getParentId($id);
if($posid == "0")
break;
$position = getPositionParent($id);
$currentBV = MemberExtra::where('user_id', $posid)->limit(3)->get();
if($position == "R"){
$new_lbv = $currentBV->left_bv ;
$new_rbv = $currentBV->right_bv + request()->input('lend_amount');