$variable = array("apple" , "orange" , null, "apple2"); DB::statement("UPDATE table1 SET field1= IsNull($variable[0],field1), field2= IsNull($variable[2],field2), where = someconditional")
I want if field is null in data array do not update but only that field. other fields (if not null) do it update How can I write this code in laravel ?