Download the PHP package tabuna/breadcrumbs without Composer
On this page you can find all versions of the php package tabuna/breadcrumbs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tabuna/breadcrumbs
More information about tabuna/breadcrumbs
Files in tabuna/breadcrumbs
Package breadcrumbs
Short Description An easy way to add breadcrumbs to your Laravel app.
License MIT
Informations about the package breadcrumbs
Introduction
Breadcrumbs 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.
Sample Post / Edit
This package for the Laravel framework will make it easy to build breadcrumbs in your application.
Installation
Run this at the command line:
This will update composer.json
and install the package into the vendor/
directory.
Define your breadcrumbs
Now you can define breadcrumbs directly in the route files:
You can also get arguments from the request:
Route detection
The package tries to reduce the number of lines needed. For this, you can skip passing the results of the route()
methods.
The following two declarations will be equivalent:
Like to use a separate route file?
You can do this simply by adding the desired file to the service provider
Then it will be your special file in the route directory:
Route resource
When using resources, a whole group of routes is declared for which you must specify values manually
`
It’s better to specify this in service providers, since route files can be cached
Output the breadcrumbs use Blade Component
You can use the output component:
To define classes of list items, you can specify:
You can also pass parameters:
And call named routes explicitly:
Output the breadcrumbs use Blade view
In order to display breadcrumbs on the desired page, simply call:
And results in this output:
Home / About
Credits
For several years, I successfully used the Dave James Miller package to solve my problems, but he stopped developing and supporting it. After a long search for alternatives, I liked the Dwight Watson 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.
License
The MIT License (MIT). Please see License File for more information.
All versions of breadcrumbs with dependencies
ext-json Version *
laravel/framework Version ^10.0|^11.0
laravel/serializable-closure Version ^1.0