PHP code example of marshmallow / breadcrumb

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

    

marshmallow / breadcrumb example snippets


use Marshmallow\Breadcrumb\Facades\Breadcrumb;

Breadcrumb::add('Blog', '/blog');
Breadcrumb::add('My article', '/blog/my-article', 'fas fa-newspaper');

use Marshmallow\Breadcrumb\Crumb;
use Marshmallow\Breadcrumb\Facades\Breadcrumb;

Breadcrumb::addCrumbs([
    Crumb::make('Blog', '/blog'),
    Crumb::make('My article', '/blog/my-article'),
]);

use Marshmallow\Breadcrumb\Crumb;

$crumb = Crumb::make('My article', '/blog/my-article')
    ->setRoute('blog.show', ['article' => $article])
    ->setIconClass('fas fa-newspaper');
bash
php artisan vendor:publish --tag="config" --provider="Marshmallow\Breadcrumb\BreadcrumbServiceProvider"
bash
php artisan vendor:publish --provider="Marshmallow\Breadcrumb\BreadcrumbServiceProvider"