PHP code example of rawilk / laravel-breadcrumbs

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

    

rawilk / laravel-breadcrumbs example snippets


// somewhere in a file defined in config/breadcrumbs.php. default = 'view' => base_path('routes/breadcrumbs.php')
Breadcrumbs::for('home', function (Generator $trail) {
    $trail->push('Home', route('home'));
});

// Home > About
Breadcrumbs::for('about', function (Generator $trail)  {
    $trail->parent('home')->push('About', route('about'));
});
bash
php artisan vendor:publish --tag="breadcrumbs-config"