Skip to content
This repository was archived by the owner on Nov 4, 2021. It is now read-only.

Commit 19226b6

Browse files
authored
trait doesn't boot in extended classes
please use this late static binding for $isSearchableTraitBooted
1 parent 3ea849b commit 19226b6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Searchable.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ trait Searchable
2626
*
2727
* @var bool
2828
*/
29-
private static $isSearchableTraitBooted = false;
29+
protected static $isSearchableTraitBooted = false;
3030

3131
public static function bootSearchable()
3232
{
33-
if (self::$isSearchableTraitBooted) {
33+
if (static::$isSearchableTraitBooted) {
3434
return;
3535
}
3636

3737
self::bootScoutSearchable();
3838

39-
self::$isSearchableTraitBooted = true;
39+
static::$isSearchableTraitBooted = true;
4040
}
4141

4242
/**

0 commit comments

Comments
 (0)