Skip to content

Commit 3c6ad27

Browse files
committed
Allow easily clearing resolved Facade instance through child class
1 parent e4551e7 commit 3c6ad27

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Illuminate/Support/Facades/Facade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,12 @@ protected static function resolveFacadeInstance($name)
247247
/**
248248
* Clear a resolved facade instance.
249249
*
250-
* @param string $name
250+
* @param ?string $name
251251
* @return void
252252
*/
253-
public static function clearResolvedInstance($name)
253+
public static function clearResolvedInstance($name = null)
254254
{
255-
unset(static::$resolvedInstance[$name]);
255+
unset(static::$resolvedInstance[$name ?? static::getFacadeAccessor()]);
256256
}
257257

258258
/**

0 commit comments

Comments
 (0)