{"id":15067043,"url":"https://github.com/tabuna/breadcrumbs","last_synced_at":"2026-04-02T19:07:23.757Z","repository":{"id":43797995,"uuid":"257672841","full_name":"tabuna/breadcrumbs","owner":"tabuna","description":"Laravel Breadcrumbs - An easy way to add breadcrumbs to your @Laravel app.","archived":false,"fork":false,"pushed_at":"2026-03-30T21:04:35.000Z","size":101,"stargazers_count":415,"open_issues_count":13,"forks_count":19,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-03-30T23:14:55.424Z","etag":null,"topics":["breadcrumb","breadcrumbs","hacktoberfest","laravel","laravel-breadcrumbs"],"latest_commit_sha":null,"homepage":"https://github.com/tabuna/breadcrumbs","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tabuna.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-21T17:54:21.000Z","updated_at":"2026-03-30T21:01:18.000Z","dependencies_parsed_at":"2025-01-11T14:00:33.845Z","dependency_job_id":"8e90a07d-1f6b-414b-bbba-b25cd277ba68","html_url":"https://github.com/tabuna/breadcrumbs","commit_stats":{"total_commits":80,"total_committers":8,"mean_commits":10.0,"dds":0.125,"last_synced_commit":"1d9047306f67e7fcc86fc7e608f1432f247636da"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/tabuna/breadcrumbs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabuna%2Fbreadcrumbs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabuna%2Fbreadcrumbs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabuna%2Fbreadcrumbs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabuna%2Fbreadcrumbs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tabuna","download_url":"https://codeload.github.com/tabuna/breadcrumbs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabuna%2Fbreadcrumbs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31313927,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["breadcrumb","breadcrumbs","hacktoberfest","laravel","laravel-breadcrumbs"],"created_at":"2024-09-25T01:15:38.195Z","updated_at":"2026-04-02T19:07:23.749Z","avatar_url":"https://github.com/tabuna.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/tabuna/breadcrumbs/master/laravel-breadcrumbs.svg\" height=\"58px;\" alt=\"Laravel Breadcrumbs\"\u003e\n\u003c/p\u003e\n\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/tabuna/breadcrumbs/workflows/run-tests/badge.svg\" alt=\"Tests\"\u003e\n\u003ca href=\"https://codecov.io/gh/tabuna/breadcrumbs\"\u003e\u003cimg src=\"https://codecov.io/gh/tabuna/breadcrumbs/branch/master/graph/badge.svg\" alt=\"codecov\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/tabuna/breadcrumbs\"\u003e\u003cimg src=\"https://img.shields.io/packagist/dt/tabuna/breadcrumbs.svg\" alt=\"Total Downloads\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/tabuna/breadcrumbs\"\u003e\u003cimg src=\"https://img.shields.io/packagist/v/tabuna/breadcrumbs.svg\" alt=\"Latest Version on Packagist\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\n## Introduction\n\nBreadcrumbs display a list of links indicating the position of the current page in the whole site hierarchy. For example, breadcrumbs like `Home / Sample Post / Edit` means the user is viewing an edit page for the \"Sample Post.\" He can click on \"Sample Post\" to view that page or click on \"Home\" to return to the homepage.\n\n\n\u003e [Home](#) / [Sample Post](#) / Edit\n\nThis package for the [Laravel framework](https://laravel.com/) will make it easy to build breadcrumbs in your application.\n\n## Installation\n\nRun this at the command line:\n```php\ncomposer require tabuna/breadcrumbs\n```\n\nThis will update `composer.json` and install the package into the `vendor/` directory.\n\n## Define your breadcrumbs\n\nNow you can define breadcrumbs directly in the route files:\n\n```php\nuse Tabuna\\Breadcrumbs\\Trail;\n\n// Home\nRoute::get('/', fn () =\u003e view('home'))\n    -\u003ename('home')\n    -\u003ebreadcrumbs(fn (Trail $trail) =\u003e\n        $trail-\u003epush('Home', route('home'))\n);\n\n// Home \u003e About\nRoute::get('/about', fn () =\u003e view('home'))\n    -\u003ename('about')\n    -\u003ebreadcrumbs(fn (Trail $trail) =\u003e\n        $trail-\u003eparent('home')-\u003epush('About', route('about'))\n);\n```\n\nYou may also retrieve arguments from the request. Parameters are resolved by name:\n\n```php\nRoute::get('/category/{category}', function (Category $category) {\n    // In this example, $category is an Eloquent model instance.\n    // ...\n})\n    -\u003ename('category')\n    -\u003ebreadcrumbs(fn (Trail $trail, Category $category) =\u003e\n        $trail-\u003epush($category-\u003etitle, route('category', $category-\u003eid))\n);\n```\n\n\n## Route detection\n\nThe package tries to reduce the number of lines needed. For this, you can skip passing the results of the `route()` methods.\nThe following two declarations will be equivalent:\n\n```php\nRoute::get('/', fn () =\u003e view('home'))\n    -\u003ename('home')\n    -\u003ebreadcrumbs(fn (Trail $trail) =\u003e\n        $trail-\u003epush('Home', route('home'))\n);\n\nRoute::get('/', fn () =\u003e view('home'))\n    -\u003ename('home')\n    -\u003ebreadcrumbs(fn (Trail $trail) =\u003e\n        $trail-\u003epush('Home', 'home')\n);\n```\n\n\n## Like to use a separate route file?\n\nYou can do this simply by adding the desired file to the service provider\n\n```php\nnamespace App\\Providers;\n\nuse Illuminate\\Support\\ServiceProvider;\n\nclass BreadcrumbsServiceProvider extends ServiceProvider\n{\n    /**\n     * Bootstrap the application events.\n     */\n    public function boot(): void\n    {\n        require base_path('routes/breadcrumbs.php');\n    }\n}\n```\n\nThen it will be your special file in the route directory:\n\n```php\n// routes/breadcrumbs.php\n\n\n// Photos\nBreadcrumbs::for('photo.index', fn (Trail $trail) =\u003e\n    $trail-\u003eparent('home')-\u003epush('Photos', route('photo.index'))\n);\n```\n\n\n\n## Route resource\n\nWhen using resources, a whole group of routes is declared for which you must specify values manually\n\n```php\n// routes/web.php\n\nRoute::resource('photos', 'PhotoController');\n````\n\nIt’s better to specify this in service providers, since route files can be cached\n\n```php\nnamespace App\\Providers;\n\nuse Illuminate\\Support\\ServiceProvider;\nuse Tabuna\\Breadcrumbs\\Breadcrumbs;\nuse Tabuna\\Breadcrumbs\\Trail;\n\nclass BreadcrumbsServiceProvider extends ServiceProvider\n{\n    /**\n     * Bootstrap any application services.\n     */\n    public function boot(): void\n    {\n        Breadcrumbs::for('photos.index', fn (Trail $trail) =\u003e\n             $trail-\u003epush('Photos', route('home'))\n        );\n        \n        Breadcrumbs::for('photos.create', fn (Trail $trail) =\u003e\n            $trail\n                -\u003eparent('photos.index', route('photos.index'))\n                -\u003epush('Add new photo', route('home'))\n        );\n    }\n}\n```\n\n## Output the breadcrumbs use Blade Component\n\nYou can use the output component:\n\n```blade\n\u003cul\u003e\n    \u003cx-tabuna-breadcrumbs/\u003e\n\u003c/ul\u003e\n```\n\nTo define classes of list items, you can specify:\n\n```blade\n\u003cx-tabuna-breadcrumbs\n  class=\"item\"\n  active=\"active\"\n/\u003e\n```\n\nYou can also pass parameters:\n\n```blade\n\u003cx-tabuna-breadcrumbs\n    :parameters=\"[\n        'foo' =\u003e 'Dashboard',\n        'baz' =\u003e 'Users',\n        'buzz' =\u003e 'Edit Profile'\n    ]\"\n/\u003e\n```\n\nAnd call named routes explicitly:\n\n```blade\n\u003cx-tabuna-breadcrumbs\n    route=\"static\"\n/\u003e\n```\n\n## Output the breadcrumbs use Blade view\n\nIn order to display breadcrumbs on the desired page, simply call:\n\n```blade\n@if(Breadcrumbs::has())\n    @foreach (Breadcrumbs::current() as $crumbs)\n        @if ($crumbs-\u003eurl() \u0026\u0026 !$loop-\u003elast)\n            \u003cli class=\"breadcrumb-item\"\u003e\n                \u003ca href=\"{{ $crumbs-\u003eurl() }}\"\u003e\n                    {{ $crumbs-\u003etitle() }}\n                \u003c/a\u003e\n            \u003c/li\u003e\n        @else\n            \u003cli class=\"breadcrumb-item active\"\u003e\n                {{ $crumbs-\u003etitle() }}\n            \u003c/li\u003e\n        @endif\n    @endforeach\n@endif\n```\n\nAnd results in this output:\n\n\u003e [Home](#) / About\n\n## Credits\n\nFor several years, I successfully used the [Dave James Miller](https://github.com/davejamesmiller/laravel-breadcrumbs) package to solve my problems, but he stopped developing and supporting it. After a long search for alternatives, I liked the [Dwight Watson](https://github.com/dwightwatson) package, but the isolation of breadcrumbs from the announcement of the routes did not give me rest. That's why I created this package. It uses the code of both previous packages.\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftabuna%2Fbreadcrumbs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftabuna%2Fbreadcrumbs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftabuna%2Fbreadcrumbs/lists"}