Skip to content

Commit 60616ea

Browse files
committed
add getAggregateRules()
1 parent a2418e1 commit 60616ea

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Searchable.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,14 @@ public function getSearchRules()
9797
$this->searchRules : [SearchRule::class];
9898
}
9999

100+
/**
101+
* @return array
102+
*/
103+
public function getAggregateRules()
104+
{
105+
return isset($this->aggregateRules) && count($this->aggregateRules) > 0 ? $this->aggregateRules : [AggregateRule::class];
106+
}
107+
100108
/**
101109
* Execute the search.
102110
*

0 commit comments

Comments
 (0)