Menu and Tab Utils

A Laravel library to to build menus and tabs navigation utilities, based on Boostrap 5 CSS Framework. Current version: 2.2.0. Project on GitHub. Project on Packagist. This demosite sources available here.

Breadcrumb navigation

Here we build a Bootstrap breadcrumb navigation menu. In your controller, define a variable this way and pass variable to the view parameters:


$element = BreadcrumbUtils::init('breadcrumb-nav', //main nav id
[
  'menu' => [
    'link-9' => [
      'icon' => '<i class="fas fa-home fa-lg"></i>',
      'title' => 'Home',
      'target' => route('menuutils', ['type' => 'breadcrumbnav'])
    ],
    'link-10' => [
      'title' => 'Second breadcrumb',
      'target' => route('menuutils', ['type' => 'breadcrumbnav'])
    ],
    'link-11' => [
      'title' => 'Third breadcrumb'
    ],
  ]
]);
return view('template', ['element' => $element]);

Then just insert the variable in the appropriate section in your view: {!! $element !!}

Example