Skip to content

Commit f6e1921

Browse files
authored
add flushMacros method
1 parent b02309d commit f6e1921

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/Macroable.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,16 @@ public static function hasMacro(string $name): bool
6565
return isset(static::$macros[$name]);
6666
}
6767

68+
/**
69+
* Flush the existing macros.
70+
*
71+
* @return void
72+
*/
73+
public static function flushMacros()
74+
{
75+
static::$macros = [];
76+
}
77+
6878
/**
6979
* Dynamically handle calls to the class.
7080
*

0 commit comments

Comments
 (0)