Skip to content

Commit de329d7

Browse files
committed
Resource is also searchable if $searchRelations is not empty
1 parent 4e4f508 commit de329d7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/SearchesRelations.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@
77

88
trait SearchesRelations
99
{
10+
/**
11+
* Determine if this resource is searchable.
12+
*
13+
* @return bool
14+
*/
15+
public static function searchable()
16+
{
17+
return parent::searchable() || ! empty(static::$searchRelations);
18+
}
19+
1020
/**
1121
* Apply the search query to the query.
1222
*

0 commit comments

Comments
 (0)