1. Go to this page and download the library: Download log1x/crumb 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/ */
log1x / crumb example snippets
# app/View/Components/Breadcrumb.php
namespace App\View\Components;
use Roots\Acorn\View\Component;
use Log1x\Crumb\Facades\Crumb;
class Breadcrumb extends Component
{
/**
* Create a new component instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* The breadcrumb items.
*
* @return string
*/
public function items()
{
return Crumb::build()->toArray();
}
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\View\View|string
*/
public function render()
{
return $this->view('components.breadcrumb');
}
}