snetty / laravel-simple-breadcrumbs
A simple Laravel-style way to create breadcrumbs in Laravel 5+.
Installs: 35
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/snetty/laravel-simple-breadcrumbs
Requires
- php: >=5.4.0
- illuminate/support: 5.*
- illuminate/view: 5.*
This package is not auto-updated.
Last update: 2025-10-26 00:29:33 UTC
README
An uber simple, "collection" style way to create breadcrumbs in Laravel 5.1.
Installation
composer require snetty/laravel-simple-breadcrumbsphp artisan vendor:publish- Add
'Snetty\LaravelSimpleBreadcrumbs\ServiceProvider'to your service providers in/config/app.php - Type hint the class in your controller
public function index(Request $request, Breadcrumbs $breadcrumbs) - Pass the object to your view
return view('sites.index', compact('sites', 'breadcrumbs')); - Render the object
{!! $breadcrumbs->render() !!}
Usage
Breadcrumbs are added to your controllers like this: $breadcrumbs->add('/the/url', 'The Link Name');,
or you can add multiple at once like this: $breadcrumbs->add(['/your-url' => 'Your Title', '/another/url'
=> 'Another Title']);.
It is suggested that you add your index breadcrumb in the controller.