Van1310
159
2
Laravel

Array to string conversion

Posted 2 months ago by Van1310

public function update(Request $request)

{

$insert=Import::pluck('Amount_Grand_Total')->toArray();
    
for($i=0;$i<count($insert);$i++)
    
{        
        
    $update[]=$insert[$i]/2;
        
    DB::table('imports')->update(array('Half_Amount'=>$update));
    
}                
    
return $update;

}

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.