Same errors with $breadcrumbs
YuPilipchinets opened this issue · 2 comments
YuPilipchinets commented
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
Use render() not @include. See readme.
…On Thu, 7 Jun 2018, 02:13 Yura P Pilipchinets, ***@***.***> wrote:
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!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#180>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAOcSPMvoiMYkCUj1WgdrZA0ezII6GCuks5t6H4jgaJpZM4UdlzZ>
.
YuPilipchinets commented
Thank you!