예제 #1
0
 public function searchUser(Request $request)
 {
     $name = $request->input('searchUser');
     $results = Asegurado::where('nombre', 'LIKE', '%' . $name . '%')->get();
     return view('asegurado.search', compact('results'));
 }
예제 #2
0
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request)
 {
     $this->validate($request, ['nombre' => 'required|min:10', 'direccion' => 'required|max:255', 'rfc' => 'required|min:10|max:13', 'zip_code' => 'required|max:5', 'telefono' => 'required|max:15', 'celular' => 'required|max:10']);
     Asegurado::find($request->input('asegurado_id'))->update($request->all());
     notify()->flash('Datos del asegurado actualizados', 'success');
     return Redirect::back();
 }