Skip to content

Commit

Permalink
Merge pull request #33 from uwpsych/fix-home-path
Browse files Browse the repository at this point in the history
fix: issue with nova path duplicated in home path
  • Loading branch information
ianrobertsFF authored Apr 25, 2023
2 parents b0b5eac + 1cf2240 commit c274584
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Breadcrumbs.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,12 @@ protected function resourceBreadcrumbs(NovaRequest $request, $resource, $breadcr
}

protected function rootBreadcrumb(NovaRequest $request) {
$rootBreadcrumb = Breadcrumb::make(__("Home"), "/");
if (!is_null(static::$rootBreadcrumbCallback)) {
return Arr::wrap(call_user_func_array(static::$rootBreadcrumbCallback, [$request, $this, Breadcrumb::make(__("Home"), config('nova.path', "/nova"))]));
return Arr::wrap(call_user_func_array(static::$rootBreadcrumbCallback, [$request, $this, $rootBreadcrumb]));
}

return [Breadcrumb::make(__("Home"), config('nova.path', "/nova"))];
return [$rootBreadcrumb];
}

public function findResource(NovaRequest $request) {
Expand Down

0 comments on commit c274584

Please sign in to comment.