snetty/laravel-simple-breadcrumbs
Composer 安装命令:
composer require snetty/laravel-simple-breadcrumbs
包简介
A simple Laravel-style way to create breadcrumbs in Laravel 5+.
关键字:
README 文档
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.
统计信息
- 总下载量: 35
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-12-07