public function nuevaClinica($data)
 {
     $ususario = \Session::get('iduser');
     $clinicas = new clinica();
     $clinicas->iduser = $ususario[0];
     $clinicas->idtipo = $data['tipo'];
     $clinicas->descripcion = $data['descripcion'];
     $clinicas->direccion = $data['direccion'];
     $clinicas->latitud = $data['latitud'];
     $clinicas->longitud = $data['longitud'];
     $clinicas->save();
     $user = User::withTrashed()->find($ususario[0]);
     $user->restore();
     $user->save();
 }
Exemple #2
0
 public function updateImagen($file)
 {
     $user = User::find(\Auth::user()->id);
     $user->urlimagen = $file->getClientOriginalName();
     return $user->save();
 }