Commit f01a7c79 authored by bvipul's avatar bvipul

Breadcrumbs Issue Resolved

parent ea6edd11
......@@ -16,4 +16,5 @@ require __DIR__.'/Blog_Tag.php';
require __DIR__.'/Blog_Management.php';
require __DIR__.'/Faqs.php';
require __DIR__.'/Module.php';
require __DIR__.'/Menu.php';
require __DIR__.'/LogViewer.php';
\ No newline at end of file
<?php
Breadcrumbs::register('admin.menus.index', function ($breadcrumbs) {
$breadcrumbs->parent('admin.dashboard');
$breadcrumbs->push(trans('menus.backend.menus.management'), route('admin.menus.index'));
});
Breadcrumbs::register('admin.menus.create', function ($breadcrumbs) {
$breadcrumbs->parent('admin.menus.index');
$breadcrumbs->push(trans('menus.backend.menus.create'), route('admin.menus.create'));
});
Breadcrumbs::register('admin.menus.edit', function ($breadcrumbs, $id) {
$breadcrumbs->parent('admin.menus.index');
$breadcrumbs->push(trans('menus.backend.menus.edit'), route('admin.menus.edit', $id));
});
<?php
require __DIR__.'/Breadcrumbs/Backend/Backend.php';
@if ($breadcrumbs)
<ol class="breadcrumb">
@foreach ($breadcrumbs as $breadcrumb)
@if (!$breadcrumb->last)
@if ($breadcrumb->url && !$loop->last)
<li><a href="{{ $breadcrumb->url }}">{{ $breadcrumb->title }}</a></li>
@else
<li class="active">{{ $breadcrumb->title }}</li>
......
......@@ -58,9 +58,8 @@
<!-- Content Header (Page header) -->
<section class="content-header">
@yield('page-header')
{{-- Change to Breadcrumbs::render() if you want it to error to remind you to create the breadcrumbs for the given route --}}
{{-- {!! Breadcrumbs::render() !!} --}}
<!-- Breadcrumbs would render from routes/breadcrumb.php -->
{!! Breadcrumbs::render() !!}
</section>
<!-- Main content -->
......
<?php
//Just pointed it to where the breadcrumbs are located, in Http/Breadcrumbs/Backend
require __DIR__.'/../app/Http/Breadcrumbs/Backend/Backend.php';
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment