Asked by: Nelson Candia
I'm working on a project that i needed to change the primary keys on a table, so when i search how to make the $variable->save() method i encounter that i needed to add a
protected $primaryKey = ['cedula','nacionalidad'];
does are my primary keys on that table, but now when i make a
$variable->save()
I't returns a error
ErrorException Illegal offset type in isset or empty
here is my code where i update
$person = AVC::where(['nacionalidad'=>Auth::user()->nacionalidad , 'cedula' => Auth::user()->cedula ])->get();
$person[0]->centro_votacion = Request('centro');
$person[0]->save();
dd($person[0]);
return redirect()->back()->with('message','Se a agregado o Actualizado tu centro de Votacion');
Casino - Dr.MCD
ReplyDeleteWelcome 성남 출장샵 to Dr.MCD, a premier provider of 대구광역 출장샵 premier quality 양산 출장샵 casino solutions, content 천안 출장마사지 and service. 동해 출장샵 Dr.MCD has over 20 years of experience in Rating: 4 · Review by Dr.MCD