File tree Expand file tree Collapse file tree 4 files changed +8
-13
lines changed Expand file tree Collapse file tree 4 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,9 @@ All notable changes to `laravel-elastica-bridge` will be documented in this file
4
4
5
5
## 1.1.0 - UNRELEASED
6
6
7
- - provide default implementation for ` Limenet\LaravelElasticaBridge\Model\ElasticsearchableInterface\toElasticsearch `
7
+ - provide default implementation for ` Limenet\LaravelElasticaBridge\Model\ElasticsearchableInterface::toElasticsearch() ` in ` ElasticsearchableTrait `
8
+ - provide default implementation for ` Limenet\LaravelElasticaBridge\Model\ElasticsearchableInterface::shouldIndex() ` in ` ElasticsearchableTrait `
9
+ - remove unused method ` Limenet\LaravelElasticaBridge\Model\ElasticsearchableInterface::getModel() `
8
10
- added tests
9
11
10
12
## 1.0.0 - 2021-05-09
Original file line number Diff line number Diff line change 9
9
10
10
interface ElasticsearchableInterface
11
11
{
12
- public function getModel (): string ;
13
-
14
12
/**
15
13
* @internal
16
14
*/
Original file line number Diff line number Diff line change 9
9
10
10
trait ElasticsearchableTrait
11
11
{
12
- final public function getModel (): string
13
- {
14
- return __CLASS__ ;
15
- }
16
-
17
12
final public function getElasticsearchId (): string
18
13
{
19
14
return $ this ::class.'| ' .$ this ->id ;
@@ -23,6 +18,11 @@ public function toElasticsearch(IndexInterface $indexConfig): array
23
18
return $ this ->toArray ();
24
19
}
25
20
21
+ public function shouldIndex (IndexInterface $ indexConfig ): bool
22
+ {
23
+ return true ;
24
+ }
25
+
26
26
public function toElasticaDocument (IndexInterface $ indexConfig ): Document
27
27
{
28
28
return new Document (
Original file line number Diff line number Diff line change @@ -15,11 +15,6 @@ class Product extends Model implements ElasticsearchableInterface
15
15
use HasFactory;
16
16
use ElasticsearchableTrait;
17
17
18
- public function shouldIndex (IndexInterface $ indexConfig ): bool
19
- {
20
- return true ;
21
- }
22
-
23
18
protected static function newFactory (): Factory
24
19
{
25
20
return ProductFactory::new ();
You can’t perform that action at this time.
0 commit comments