diff --git a/src/Translatable.php b/src/Translatable.php index a55487b..f49b13e 100644 --- a/src/Translatable.php +++ b/src/Translatable.php @@ -230,7 +230,7 @@ protected function onIndexPage(): bool return false; } - $currentController = Str::before(request()->route()->getAction()['controller'], '@'); + $currentController = Str::before(request()->route()->getAction()['controller'] ?? '', '@'); return $currentController === ResourceIndexController::class; }