Modified create cabecera controller

This commit is contained in:
cgonzalesmo 2022-10-18 00:05:57 -05:00
parent 9020aed4af
commit 827ff6e7c7

View File

@ -71,6 +71,7 @@ public function updateEstandar(Request $request, $id){
if(Estandar::where(["id_user"=>$id_user,"id"=>$id])->exists()){ if(Estandar::where(["id_user"=>$id_user,"id"=>$id])->exists()){
$estandar = Estandar::find($id); $estandar = Estandar::find($id);
$estandar->name = isset($request->name) ? $request->name : $estandar->name; $estandar->name = isset($request->name) ? $request->name : $estandar->name;
$estandar->cabecera = isset($request->cabecera) ? $request->cabecera : $estandar->cabecera;
$estandar->save(); $estandar->save();
return response([ return response([
"status" => 1, "status" => 1,