library laravel-breadcrums
A helper function to create breadcrums for you website
faisalahsanse/laravel-breadcrums
A helper function to create breadcrums for you website
- Wednesday, December 9, 2015
- by faisalahsanse
- Repository
- 1 Watchers
- 2 Stars
- 7 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 1 Forks
- 0 Open issues
- 4 Versions
- 0 % Grown
Laravel Breadcrums
A laravel breadcrums that will automatically generate the navigation breadcrums that you will specify., (*1)
Installation
Perform the following operations in order to use this middleware
- Run composer require faisalahsanse/laravel-breadcrums in your terminal
- Add Service Provider
Open config/app.php and add Faisalahsan\Breadcrums\BreadcumsServiceProvider::class to the end of providers array:, (*2)
```
'providers' => array(
....
Faisalahsan\Breadcrums\BreadcumsServiceProvider::class,
),
```
How to use
-
Create a section breadcrums in your master layout (or whatever you are using), (*3)
**blade template**
@section('breadcrums')
@show
-
Extend your page with your master layout, in which you want to show breadcrums and define an array of breadcrums., (*4)
@extends('layouts.master')
@section('breadcrums')
{{-- */
$breadcrumbLinks =[ 'currentPageDisplayName' => 'My Current Page',
'breadcrumbLinks' => [ 'mySecondPageRouteName' => 'Previous Second Page',
'myFirstPageRouteName' => 'Previous First Page',
...
]];
/* --}}
{{ breadcrums( $breadcrumbLinks )}}
@show
-
Use routes without parameters, (*5)
@section('breadcrums')
{{-- */
$breadcrumbLinks =[ 'currentPageDisplayName' => 'My Current Page',
'breadcrumbLinks' => [ 'mySecondPageRouteName' => 'Previous Second Page',
'myFirstPageRouteName' => 'Previous First Page',
...
]];
/* --}}
{{ breadcrums( $breadcrumbLinks )}}
@show
-
Use routes parameters, (*6)
@section('breadcrums')
{{-- */
$breadcrumbLinks =[ 'currentPageDisplayName' => 'My Current Page',
'breadcrumbLinks' => [ 'mySecondPageRouteName' => 'Previous Second Page',
'myFirstPageRouteName' => 'Previous First Page',
'myRouteWithParameters' => [ 'routedDisplayName' => 'Route With Parameter',
'routedParameters' =>['firstParamName' => 'firstParamValue',
'secondParamName' => 'secondParamValue',
....
]]
...
]];
/* --}}
{{ breadcrums( $breadcrumbLinks )}}
@show
-
Customize style of breadcrums navigation, (*7)
**breadcrumb** class define html tag **ul**
**breadcrumb-item** class define html tag **li*8 of **ul**
How to Contribute
- Feel free to add some new functionality, improve some existing functionality etc and open up a pull request explaining what you did.
- Report any issues in the issues section
- Also you can reach me directly at faisalahsan.se@gmail.com with any feedback
dev-master
9999999-dev
A helper function to create breadcrums for you website
Sources
Download
MIT
The Requires
by
Faisal Ahsan
laravel
helper
view
faisalahsanse
laravel-breadcrums
breadcrums
1.1.0
1.1.0.0
A helper function to create breadcrums for you website
Sources
Download
MIT
The Requires
by
Faisal Ahsan
laravel
helper
view
faisalahsanse
laravel-breadcrums
breadcrums
v1.0.2
1.0.2.0
A helper function to create breadcrums for you website
Sources
Download
MIT
The Requires
by
Faisal Ahsan
laravel
helper
view
faisalahsanse
laravel-breadcrums
breadcrums
v1.0.1
1.0.1.0
A helper function to create breadcrums for you website
Sources
Download
MIT
The Requires
by
Faisal Ahsan
laravel
helper
view
faisalahsanse
laravel-breadcrums
breadcrums