]> BookStack Code Mirror - bookstack/blob - app/Search/SearchTerm.php
Tests: Updated comment test to account for new editor usage
[bookstack] / app / Search / SearchTerm.php
1 <?php
2
3 namespace BookStack\Search;
4
5 use BookStack\App\Model;
6
7 class SearchTerm extends Model
8 {
9     protected $fillable = ['term', 'entity_id', 'entity_type', 'score'];
10     public $timestamps = false;
11
12     /**
13      * Get the entity that this term belongs to.
14      *
15      * @return \Illuminate\Database\Eloquent\Relations\MorphTo
16      */
17     public function entity()
18     {
19         return $this->morphTo('entity');
20     }
21 }