diglactic / laravel-breadcrumbs

Laravel Breadcrumbs - A simple Laravel-style way to create breadcrumbs.
https://packagist.org/packages/diglactic/laravel-breadcrumbs
MIT License
868 stars 63 forks source link

Add this to routes/breadcrumbs.php #23

Closed donchoborisov closed 3 years ago

donchoborisov commented 3 years ago

Hi there,

I am following the instructions however i can only display Home breadcrumb but its not working for about and etc

`<?

// Home Breadcrumbs::for('home', function ($trail) { $trail->push('Home', route('home')); });

// Home > About Breadcrumbs::for('about', function ($trail) { $trail->parent('home'); $trail->push('About', route('about')); });`

` //pages routes Route::get('/', function () {

$courses = App\Course::all();

return view('pages.home',compact('courses'));

});

Route::get('/about', function() { $id = 2; $page1 = App\Page::where('id','=', $id)->first(); return view('pages.about',compact('page1')); }); `