Skip to content

Commit

Permalink
fix controller null
Browse files Browse the repository at this point in the history
  • Loading branch information
bocanhcam committed Nov 26, 2024
1 parent 64f0c83 commit abd3223
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Http/Middleware/BreadcrumbReplacement.php
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}

Expand Down

0 comments on commit abd3223

Please sign in to comment.