Skip to content

Commit

Permalink
Merge pull request #81 from designmynight/set-search-index
Browse files Browse the repository at this point in the history
feat: method to set the search index
  • Loading branch information
Will Taylor-Jackson authored Jan 29, 2019
2 parents 0a64f3c + 8f690fe commit ae47f06
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Searchable.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@ public function getSearchIndex()
return $this->searchIndex ?? $this->getTable();
}

/**
* Set the index this model is to be added to
*
* @param string
* @return self
*/
public function setSearchIndex(string $index)
{
$this->searchIndex = $index;

return $this;
}

/**
* Get the search type associated with the model.
*
Expand Down

0 comments on commit ae47f06

Please sign in to comment.