Hi to all i experience this kind of error when i tried to add the data to database using for each here is my code.
$org = Input::get('orgname');
$orgs_date = Input::get('orgsattended');
foreach($org as $o=>$von){
DB::table('orgs')->insert(array(
'personnel_id' => $personnel_id,
'orgs_name' => $von,
'date_attended' => $org_date[$o]
)
);
}
$skillname = Input::get('skillname');
$skillproficiency = Input::get('skillproficiency');
foreach($skillname as $sn=>$vsn){
DB::table('skills')->insert(array(
'personnel_id' => $personnel_id,
'skill_name' => $vsn,
'proficiency' => $skillproficiency[$sn]
)
);
}
i need to add the data to seperate database.
when i only use one code it works.