Пример #1
0
 /**
  * @param \Illuminate\Database\Eloquent\Model $model
  */
 public function created(Model $model)
 {
     $this->indexer($model);
     if (!$this->indexer->create()) {
         $this->indexer->document()->save();
     }
 }
 public function testCanCheckIndex()
 {
     $model = m::mock('Illuminate\\Database\\Eloquent\\Model');
     $index = new Index($model);
     $this->assertEquals(false, $index->has('test'));
 }