PHP code example of kkiernan / breadcrumbs

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

    

kkiernan / breadcrumbs example snippets


'providers' => [
    Kiernan\Breadcrumbs\ServiceProvider::class,
],

'aliases' => [
    'Breadcrumbs' => \Kiernan\Breadcrumbs\Facade::class,
]

Breadcrumbs::add('Posts', action('PostsController@index'));
Breadcrumbs::add('New Post');

Breadcrumbs::addMany([
    ['Posts', action('PostsController@index')],
    ['New Post']
]);

// DashboardController@index...
Breadcrumbs::put('posts', 'Dashboard', action('DashboardController@index'));

// PostsController@index...
Breadcrumbs::put('posts', 'Posts', action('DashboardController@index'));

// PostsController@show...
Breadcrumbs::addDynamic('posts');
Breadcrumbs::add($post->title);

Breadcrumbs::forget('posts');

php artisan vendor:publish --tag=kkiernan