public function registrarPersona($nombre, $apellido, $idUsuario) { $persona = Persona::create(['apellido' => $apellido, 'celular' => '', 'nombre' => $nombre, 'fechanacimiento' => '01/01/1989', 'nroidentidad' => '', 'pais' => '', 'rol' => 'turista', 'telefono' => '', 'tipoidentidad' => '', 'agencia_id' => 0, 'attachment' => 0, 'user_id' => $idUsuario]); return true; }
/** * Create a new user instance after a valid registration. * * @param array $data * @return User */ protected function create(array $data) { $usuario = User::create(['email' => $data['email'], 'estado' => 'Enable', 'password' => bcrypt($data['password'])]); return Persona::create(['nombre' => $data['nombre'], 'apellido' => $data['apellido'], 'celular' => '', 'fechanacimiento' => '', 'nroidentidad' => '', 'pais' => '', 'rol' => 'turista', 'telefono' => 'turista', 'tipoidentidad' => 'turista', 'agencia_id' => 0, 'user_id' => $usuario->id, 'attachment_id' => 'null']); }
public function persona() { return $this->hasMany(Persona::getClass()); }