PHP code example of netflex / breadcrumbs
1. Go to this page and download the library: Download netflex/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/ */
netflex / breadcrumbs example snippets
use Netflex\Breadcrumbs\Breadcrumb;
use Netflex\Pages\Page;
// Create breadcrumb based on current page
$page = Page::current();
$options = [];
$breadcrumb = new Breadcrumb($page, $options);
// Get breadcrumb data
$breadcrumb = $breadcrumb->get();
Illuminate\Support\Collection Object (
[items:protected] => Array (
[0] => Array (
[label] => 'Home'
[originalLabel] => 'Home'
[path] => '/'
[id] => 10000
[type] => 'page'
[published] => true
[current] => false
)
[1] => Array (
[label] => 'Example'
[originalLabel] => 'Example'
[path] => '/example'
[id] => 10027
[type] => 'page'
[published] => true
[current] => true
)
)
)