/** * Seed the specialties table. * * @return void * @author PJ */ private function seedTable($data) { foreach ($data as $lineIndex => $row) { try { $specialty = App\Specialty::find($row[0]); $subspecialty = App\Specialty::find($row[1]); DB::table('specialty_subspecialty')->insert(['specialty_id' => $specialty->code, 'subspecialty_id' => $subspecialty->code]); } catch (ErrorException $ee) { } } }
/** * Seed the specialties table. * * @return void * @author PJ */ private function seedTable($data) { foreach ($data as $lineIndex => $row) { try { $specialty_id = App\Specialty::find($row[0]); $alias_id = App\Alias::find($row[1]); DB::table('specialty_alias')->insert(['specialty_id' => $specialty_id->code, 'alias_id' => $alias_id->id]); } catch (ErrorException $ee) { } } }