/** * 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) { } } }
/** * Seed the specialties table. * * @return void * @author PJ */ private function seedTable($data) { foreach ($data as $lineIndex => $row) { $alias = App\Alias::create(['alias' => $row[0]]); } }