private function cargarTablaNivelInstruccion() { //Se buscan los distintos niveles de instruccion en el sasyc viejo... $this->info("Migrando Niveles academicos"); $niveles = DB::connection('sasyc_viejo')->table('personas_sasyc')->distinct()->select('nivelinstruccion')->get(); foreach ($niveles as $key => $nivel) { $existe = NivelAcademico::where('nombre', 'ILIKE', $nivel->nivelinstruccion)->count(); if ($existe == 0) { $this->info("Creando " . $nivel->nivelinstruccion); $nivelNuevo = new NivelAcademico(); $nivelNuevo->desabilitarValidaciones(); $nivelNuevo->nombre = $nivel->nivelinstruccion; $nivelNuevo->orden = $key; $nivelNuevo->save(); } } }