Exemple #1
0
 public function testModelFactory()
 {
     $note = factory(Note::class)->create();
     $noteFromDB = Note::where('submitter', $note->submitter)->first();
     $this->assertEquals($note->submitter, $noteFromDB->submitter);
 }
Exemple #2
0
 /**
  * {@inheritdoc}.
  */
 protected function findWithCondition($filter)
 {
     return Note::where('id', $filter)->orWhere('submitter', 'like', '%' . $filter . '%')->get();
 }