コード例 #1
0
 /**
  * Test to insert 4 notes
  *
  * @return void
  */
 public function testAdd()
 {
     $list1 = ['doctor_id' => '1', 'subject' => 'testNote1.com', 'body' => "Testing Notes 1"];
     $list2 = ['doctor_id' => '1', 'subject' => 'testNote2.com', 'body' => "Testing Notes 2"];
     $list3 = ['doctor_id' => '1', 'subject' => 'testNote3.com', 'body' => "Testing Notes 3"];
     $list4 = ['doctor_id' => '1', 'subject' => 'testNote4.com', 'body' => "Testing Notes 4"];
     $testNotes = Note::firstOrCreate($list1);
     $testNotes = Note::firstOrCreate($list2);
     $testNotes = Note::firstOrCreate($list3);
     $testNotes = Note::firstOrCreate($list4);
 }
コード例 #2
0
 function saveNotes($list)
 {
     $note = Note::firstOrCreate($list);
 }