Exemplo n.º 1
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $maxParticipantID = Participant::count();
     $maxTrialID = Trial::count();
     for ($i = 0; $i < 1000; $i++) {
         $p = new Participation();
         $p->participant_id = rand(1, $maxParticipantID);
         $p->trial_id = rand(1, $maxTrialID);
         $p->save();
     }
     //
 }