PHP code example of crumby / breadcrumbs

1. Go to this page and download the library: Download crumby/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/ */

    

crumby / breadcrumbs example snippets


> composer san vendor:publish --provider="Crumby\Breadcrumbs\BreadcrumbsServiceProvider" --tag=config
> php artisan vendor:publish --provider="Crumby\Breadcrumbs\BreadcrumbsServiceProvider" --tag=lang

'providers' => [
    ......................
    'Crumby\Breadcrumbs\BreadcrumbsServiceProvider',
    ........................
 ];
 
 'aliases' => [ 
    ......................
    'Breadcrumbs' => 'Crumby\Breadcrumbs\Facades\Breadcrumbs',
    ......................
 ];
      

return [
    'routes' => [
        'package' => [
            'childOf' => [
                'route' => 'packages'
            ]   
        ],
        'article' => [
            'childOf' => [
                'route' => 'package'
            ]   
        ],
    ]
];

    class StaticPagesController extends Controller {
        public function __construct()
        {
            ...........................
            $this->middleware('crumbs');
            ...........................
        }
    }