Replace magic facades

This commit is contained in:
James Cole
2025-05-24 17:15:46 +02:00
parent e333dedeec
commit b830bd2732
14 changed files with 38 additions and 23 deletions

View File

@@ -247,7 +247,7 @@ class General extends AbstractExtension
static function (): string {
$args = func_get_args();
$route = $args[0]; // name of the route.
$name = \Route::getCurrentRoute()->getName() ?? '';
$name = Route::getCurrentRoute()->getName() ?? '';
if (str_contains($name, $route)) {
return 'active';
}
@@ -271,7 +271,7 @@ class General extends AbstractExtension
if ($objectType === $activeObjectType
&& false !== stripos(
(string) \Route::getCurrentRoute()->getName(),
(string) Route::getCurrentRoute()->getName(),
(string) $route
)) {
return 'active';
@@ -294,7 +294,7 @@ class General extends AbstractExtension
static function (): string {
$args = func_get_args();
$route = $args[0]; // name of the route.
$name = \Route::getCurrentRoute()->getName() ?? '';
$name = Route::getCurrentRoute()->getName() ?? '';
if (str_contains($name, $route)) {
return 'menu-open';
}