d13r/laravel-breadcrumbs

Same errors with $breadcrumbs

YuPilipchinets opened this issue · 2 comments

Sorry for my language

I/m using Custom template in Laravel 5.6? but i have error in blade template:
Undefined variable: breadcrumbs

I'm using blade template for bootstrap 4.
This config (config/breadcrumbs.php):
'view' => 'admin.components.breadcrumbs',

This blade template:

@if (count($breadcrumbs))
	<ol class="breadcrumb">
		@foreach ($breadcrumbs as $breadcrumb) 
			@if ($breadcrumb->url && !$loop->last)
				<li class="breadcrumb-item">
					<a href="{{ $breadcrumb->url }}">{{ $breadcrumb->title }}</a>
				</li>
			@else
				<li class="breadcrumb-item active">{{ $breadcrumb->title }}</li>
			@endif 
		@endforeach
	</ol>
@endif

and this index.blade.php:

<h5 class="card-title">
   @include('admin.components.breadcrumbs')
</h5>

Help me please!

d13r commented

Thank you!