Skip to content

Commit

Permalink
check exists page and menu
Browse files Browse the repository at this point in the history
  • Loading branch information
aniliso committed Apr 1, 2017
1 parent 4cf94ce commit 05383fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion views/partials/footer/3.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,16 @@
</div>
</div>

@php $menu = app(\Modules\Menu\Repositories\MenuRepository::class)->findBySlug('clinic') @endphp

@if(isset($menu))
<div class="col-md-3 col-sm-6">
<div class="widget widget_text contact">
<h3 class="widget-title"><i class="fa fa-stethoscope"></i> {{ app(\Modules\Menu\Repositories\MenuRepository::class)->findBySlug('clinic')->title }}</h3>
<h3 class="widget-title"><i class="fa fa-stethoscope"></i> {{ $menu->title }}</h3>
{!! Menu::render('clinic', \Modules\Theme\Presenters\Medical\FooterMenuLinksPresenter::class) !!}
</div>
</div>
@endif

<div class="col-md-3 col-sm-6">
<div class="widget widget_text contact">
Expand Down
3 changes: 2 additions & 1 deletion views/partials/parts/section/2.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<div class="panel-group" id="accordion">

@php $page = Page::find(2); @endphp
@if(isset($page))
@foreach($page->children()->get() as $service)
<div class="panel panel-default">
<div class="panel-heading">
Expand All @@ -36,7 +37,7 @@
</div>
</div>
@endforeach

@endif
</div>

</div>
Expand Down

0 comments on commit 05383fc

Please sign in to comment.