diff --git a/src/Http/Middleware/BreadcrumbReplacement.php b/src/Http/Middleware/BreadcrumbReplacement.php index e7a6bcf..b596315 100644 --- a/src/Http/Middleware/BreadcrumbReplacement.php +++ b/src/Http/Middleware/BreadcrumbReplacement.php @@ -81,6 +81,10 @@ public function handle(Request $request, Closure $next) */ protected function isPageController($controller): bool { + if (empty($controller)){ + return false; + } + return ((new ReflectionClass($controller))?->getNamespaceName() ?? false) === "Laravel\Nova\Http\Controllers\Pages"; }