Commit 4b342088 authored by Viral Solani's avatar Viral Solani
parents bd00f9e1 e93ac586
MIT License
Copyright (c) [2017] Viral Solani [viral.solani@gmail.com]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
\ No newline at end of file
# laravel-adminpanel # laravel-adminpanel
\ No newline at end of file
### License
[MIT LICENSE](https://github.com/viralsolani/laravel-adminpanel/blob/master/LICENSE.txt)
...@@ -16,4 +16,5 @@ require __DIR__.'/Blog_Tag.php'; ...@@ -16,4 +16,5 @@ require __DIR__.'/Blog_Tag.php';
require __DIR__.'/Blog_Management.php'; require __DIR__.'/Blog_Management.php';
require __DIR__.'/Faqs.php'; require __DIR__.'/Faqs.php';
require __DIR__.'/Module.php'; require __DIR__.'/Module.php';
require __DIR__.'/Menu.php';
require __DIR__.'/LogViewer.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) @if ($breadcrumbs)
<ol class="breadcrumb"> <ol class="breadcrumb">
@foreach ($breadcrumbs as $breadcrumb) @foreach ($breadcrumbs as $breadcrumb)
@if (!$breadcrumb->last) @if ($breadcrumb->url && !$loop->last)
<li><a href="{{ $breadcrumb->url }}">{{ $breadcrumb->title }}</a></li> <li><a href="{{ $breadcrumb->url }}">{{ $breadcrumb->title }}</a></li>
@else @else
<li class="active">{{ $breadcrumb->title }}</li> <li class="active">{{ $breadcrumb->title }}</li>
......
...@@ -58,9 +58,8 @@ ...@@ -58,9 +58,8 @@
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
<section class="content-header"> <section class="content-header">
@yield('page-header') @yield('page-header')
<!-- Breadcrumbs would render from routes/breadcrumb.php -->
{{-- Change to Breadcrumbs::render() if you want it to error to remind you to create the breadcrumbs for the given route --}} {!! Breadcrumbs::render() !!}
{{-- {!! Breadcrumbs::render() !!} --}}
</section> </section>
<!-- Main content --> <!-- 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