1. Go to this page and download the library: Download aelora/laravel-breadcrumbs library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
aelora / laravel-breadcrumbs example snippets
return [
'home' => [
// Should the home link be automatically ' ],
// Which blade template to use. Currently only tailwind is supported.
'theme' => 'tailwind',
// View to use to generate the HTML breadcrumbs. If defined, this will
// override the theme above.
'view' => '',
// Character to use as a separator between crumbs. Use and encoded entity
// if you want something like >
'separator' => '/',
];
// In your controller
use Aelora\Breadcrumbs\Breadcrumbs;
$breadcrumbs = Breadcrumbs::create()
->add('Page #1', url('/page-1'))
->add('Page #2', url('/page-2'))
->add('Current Page');
return view('some.view.file', ['breadcrumbs' => $breadcrumbs]);
// In your view where ever your want the breadcrumbs
{!! $breadcrumbs !!}