Skip to content
This repository has been archived by the owner on Oct 18, 2020. It is now read-only.

Add support for custom breadcrumbs action in route #74

Closed
wants to merge 1 commit into from

Conversation

robjbrain
Copy link

With this change you can define your breadcrumbs separately from your route name within your routes.php file:

Route::get('forums/category/{category}/{title}', array('as' => 'forums_category', 'uses' => 'ForumsController@getCategory', 'breadcrumbs'=>'category'));

In this example the route name is "forums_category" and the breadcrumbs name is "category". With currently functionality "Breadcrumbs::render('category')" would be called. With this pull request, "Breadcrumbs::render('forums_category')" would be called. But the route name is still used if the breadcrumbs name is not defined.

With this change you can define your breadcrumbs separately from your route name within your routes.php file:

Route::get('forums/category/{category}/{title}', array('as' => 'forums_category', 'uses' => 'ForumsController@getCategory', 'breadcrumbs'=>'category'));
@d13r
Copy link
Owner

d13r commented Jun 9, 2015

Sounds good. If you can add a unit test and documentation I'll merge it - or if not I'll write them and merge it when I get a chance to. Thanks!

@d13r
Copy link
Owner

d13r commented Oct 8, 2016

Laravel Breadcrumbs is no longer officially maintained
Please see the README file for further details.

@d13r d13r closed this Oct 8, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants