PHP code example of noherczeg / breadcrumb

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

    

noherczeg / breadcrumb example snippets


'Breadcrumb' => 'Noherczeg\Breadcrumb\Facades\Breadcrumb'

$ php artisan config:publish noherczeg/breadcrumb

$dictionary = array('this' => 'to_this', 'what' => 'what not?');
$bc = new \Noherczeg\Breadcrumb\Breadcrumb('http://localhost/breadcrumb/', $dictionary);

Breadcrumb::setConfiguration(array('language' => 'de'));

// Using a PHP array to fill our list
$bc->from(array('test-segment', 'second', '3rd', 'Fourth-Thingy'));

// or JSON array
$bc->from('["asds", "12323", "Qw-Er-Ty"]');

// or URI String
$bc->from('First-Segment/Second/3rdWhatever');

// the last parameter flags the Segment as disabled
$bc->append(URI::segment(2), 'left', false, true, true);

// Sample list initialization
$bc->from(array('test-segment', 'second', '3rd', 'Fourth-Thingy'));

/**
 * This way you'll get Bootstrap styled breadcrumbs with unmodified casing, the last
 * element as link, and a "+" as separator
 */
echo $bc->build('bootstrap', null, false, '+');