. */ namespace App\Contracts; interface Searchable { /** * Returns this model in Elasticsearch-friendly form. The array returned by * this method should match the current mapping for this model's ES type. * * @return array */ public function toElasticsearch():array; /** * @return bool whether this particular object should be indexed or not */ public function shouldBeIndexed():bool; public function updateElasticsearchEntry(); public function updateElasticsearchEntrySynchronously(); }