Laravel Bootstrap Menu are helper to create dynamic menu within laravel. This helper temporary tested with SB Admin 2. So please be patient for further development.
Add a comment
Laravel Breadcrumb are breadcrumb helpers for Laravel. It use bootstrap template, so you need bootstrap on your laravel layout.
Repositories: https://github.com/hoaaah/laravel-bootstrap-breadcrumb
The preferred way to install this extension is through composer.
Either run
composer require hoaaah/laravel-bootstrap-breadcrumb:dev-master
or add
"hoaaah/laravel-bootstrap-breadcrumb": "dev-master"
to the require section of your composer.json
file.
You can use this helper in your view. It also support blade template.
This helper consist of this following code.
use hoaaah\LaravelBreadcrumb\Breadcrumb as Breadcrumb;
// ..........
$breadcrumb = new Breadcrumb(); // class
$breadcrumb->begin(); //required to begin breadcrumb
//your breadcrumb ---------------------------
$breadcrumb->end(); //required to end breadcrumb
This helper use url('/')
as default home Url. You can change your home url with homeUrl
method. The following code as an example.
$breadcrum = new Breadcrumb();
$breadcrumb->homeUrl = 'home'; // Use this if you want costum homeUrl, default to url('/');
$breadcrumb->begin();
//.....................
$breadcrumb->end();
You can use method add
to add your breadcrumb. This method have two parameter,
label
is a string. This param use for label of your breadcrumb. This param is required for add breadcrumbThe following code are complete example of breadcrumb item
use hoaaah\LaravelBreadcrumb\Breadcrumb as Breadcrumb;
$breadcrumb = new Breadcrumb();
$breadcrumb->begin();
$breadcrumb->add(['label' => 'Link 1']);
$breadcrumb->add(['url' => '/link2', 'label' => 'Link 2']);
$breadcrumb->add(['label' => $this->title]);
$breadcrumb->end();
Add a comment