Skip to content

Commit a414c9a

Browse files
authored
Merge pull request #384 from tillkruss/patch-3
Add __call() method to AlgoliaEngine
2 parents 1e22f8e + 18f3fb1 commit a414c9a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Engines/AlgoliaEngine.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,4 +228,16 @@ protected function usesSoftDelete($model)
228228
{
229229
return in_array(SoftDeletes::class, class_uses_recursive($model));
230230
}
231+
232+
/**
233+
* Dynamically call the Algolia client instance.
234+
*
235+
* @param string $method
236+
* @param array $parameters
237+
* @return mixed
238+
*/
239+
public function __call($method, $parameters)
240+
{
241+
return $this->algolia->$method(...$parameters);
242+
}
231243
}

0 commit comments

Comments
 (0)