oak / breadcrumbs
This is a package that enables you to use breadcrumbs
0.6
2018-05-18 17:42 UTC
Requires
- php: >=5.3.0
- laravel/framework: ~5.0
This package is not auto-updated.
Last update: 2024-12-21 17:17:23 UTC
README
This is a package for Laravel 4.
###Add to your laravel project
Install by adding to yur composer.json
"ekhaga/breadcrumbs": "dev-master"
'providers' => array(
...,
'Oak\Breadcrumbs\BreadcrumbsServiceProvider',
)
May skip this and just import/use it in the controller.
'aliases' => array(
...,
'Breadcrumbs' => 'Oak\Breadcrumbs\Facades\Breadcrumbs'
)
Add an item
Breadcrumbs::add('Home', '/');
Enable divider
Breadcrumbs::enableDivider();
Set divider character
Breadcrumbs::setDivider('→');
Set a css class to the list
Breadcrumbs::cssClass('yourclass')
Render the crumbs This will render the crumbs in a ul list if there is any crumbs
Breadcrumbs::render()
Get all crumbs This function will return all breadcrumbs in an array
Breadcrumbs::all()