/**
  * 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) {
         }
     }
 }
 /**
  * Seed the specialties table.
  *
  * @return void
  * @author PJ
  */
 private function seedTable($data)
 {
     foreach ($data as $lineIndex => $row) {
         $specialty = App\Specialty::create(['code' => $row[0], 'full' => $row[1], 'is_parent' => $row[2] == 'yes' ? 1 : 0]);
     }
 }
Example #4
0
 /**
  * Seed the specialties table.
  *
  * @return void
  * @author PJ
  */
 private function seedTable($data)
 {
     foreach ($data as $lineIndex => $row) {
         $specialty = App\Specialty::create(['code' => $row[0], 'full' => $row[1]]);
     }
 }