Example #1
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     # First get the user id
     $user_id = \App\User::where('name', '=', 'Jill')->pluck('id');
     # Next get the verb id
     $verb_id = \App\Verb::where('infinitive_it', '=', 'essere')->pluck('id');
     # Next get the tense id
     $tense_id = \App\Tense::where('tense', '=', 'Present Indicative')->pluck('id');
     DB::table('transactions')->insert(['user_id' => $user_id, 'verb_id' => $verb_id, 'tense_id' => $tense_id, 'response_1ps' => TRUE, 'response_2ps' => TRUE, 'response_3ps' => TRUE, 'response_1pp' => FALSE, 'response_2pp' => TRUE, 'response_3pp' => TRUE, 'pct_correct' => 83.3, 'created_at' => Carbon\Carbon::now()->toDateTimeString(), 'updated_at' => Carbon\Carbon::now()->toDateTimeString()]);
 }