interface_exists does not work how I expected, switch to is_subclass_of
This commit is contained in:
parent
048784607d
commit
238ce435d6
2 changed files with 12 additions and 1 deletions
|
@ -187,7 +187,7 @@ abstract class EloquentRepository extends Repository implements RepositoryInterf
|
|||
public function all()
|
||||
{
|
||||
$instance = $this->getBuilder();
|
||||
if (interface_exists(SearchableInterface::class)) {
|
||||
if (is_subclass_of(get_called_class(), SearchableInterface::class)) {
|
||||
$instance = $instance->search($this->searchTerm);
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue