push($websiteTranslations->translate('Home'), ProjectSection::Home->url($project, $websiteTranslations->getLanguage())); }); Breadcrumbs::for('feedbacks.index', function ($trail, Project $project, WebsiteTranslations $websiteTranslations) { $trail->parent('home', $project, $websiteTranslations); $trail->push($websiteTranslations->translate('site.Feedback'), ProjectSection::Feedback->url($project, $websiteTranslations->getLanguage())); }); // Documentation Breadcrumbs::for('documentation.no-default-version', function ($trail, Project $project, WebsiteTranslations $websiteTranslations) { $trail->parent('home', $project, $websiteTranslations); $trail->push($websiteTranslations->translate('site.Documentation'), ProjectSection::Documentation->url($project, $websiteTranslations->getLanguage())); }); Breadcrumbs::for('documentation.index', function ($trail, Project $project, WebsiteTranslations $websiteTranslations, DocumentationVersion $version) { $trail->parent('home', $project, $websiteTranslations); $trail->push($websiteTranslations->translate('site.Documentation'), ProjectSection::DocumentationVersion->url($project, $websiteTranslations->getLanguage(), ['version' => $version->slug])); }); Breadcrumbs::for('documentation.category-path', function ($trail, Project $project, WebsiteTranslations $websiteTranslations, DocumentationVersion $version, Collection $categoryPath) { $trail->parent('documentation.index', $project, $websiteTranslations, $version); foreach ($categoryPath as $pathItem) { $trail->push( $pathItem->content->title, ProjectSection::DocumentationCategory->url($project, $websiteTranslations->getLanguage(), ['version' => $version->slug, 'slug' => $pathItem->slug]) ); } }); Breadcrumbs::for('documentation.category', function ($trail, Project $project, WebsiteTranslations $websiteTranslations, DocumentationVersion $version, DocumentationCategory $category, ?Collection $categoryPath) { $trail->parent('documentation.category-path', $project, $websiteTranslations, $version, $categoryPath ?? collect()); $trail->push( $category->content->title, ProjectSection::DocumentationCategory->url($project, $websiteTranslations->getLanguage(), ['version' => $version->slug, 'slug' => $category->slug]) ); }); Breadcrumbs::for('documentation.view', function ($trail, Project $project, WebsiteTranslations $websiteTranslations, DocumentationVersion $version, Documentation $documentation, ?Collection $categoryPath) { $trail->parent('documentation.category-path', $project, $websiteTranslations, $version, $categoryPath ?? collect()); $trail->push( $documentation->content->title, ProjectSection::Documentation->url($project, $websiteTranslations->getLanguage(), ['version' => $version->slug, 'slug' => $documentation->slug]) ); }); // End Documentation