TanchoToplineCargo/resources/views/client/topCargo/partials/master-head.blade.php

97 lines
5.5 KiB
PHP
Raw Normal View History

2024-05-05 04:47:49 +00:00
@use('App\Models\Services')
@use('App\Models\Companyarticles')
<header id="masthead" class="site-header clearfix">
<div class="header-main clearfix">
<div class="container mobile_relative">
<div class="row">
<div class="site-logo col-md-2 col-sm-6 col-xs-6">
<a href="{{ route('home') }}" class="logo">
<img src="<?php echo base_url(SITEVARS->primary_logo); ?>" alt="{{ SITEVARS->title }}" class="logo-light show-logo">
<img src="<?php echo base_url(SITEVARS->secondary_logo); ?>" alt="{{ SITEVARS->title }}" class="logo-dark hide-logo">
</a>
<h1 class="site-title"><a href="{{ route('home') }}">{{ SITEVARS->title }}</a></h1>
</div>
<div class="site-menu col-md-9 col-sm-6 col-xs-6">
<nav id="site-navigation" class="main-nav primary-nav nav">
@if ($headerMenuItems->isNotEmpty())
<ul class="menu">
@foreach ($headerMenuItems as $menuItem)
@switch ($menuItem->type)
@case ('tbl_articles')
@php $menuItem->link = route('profile.single', ['parent'=>'article','alias'=> Articles::find($menuItem->ref)->alias]); @endphp
@break
@case ('tbl_franchises')
@php $menuItem->link = route('showFranchise', Franchises::find($menuItem->ref)->alias); @endphp
@break
@case ('tbl_services')
@php $menuItem->link = route('showService', Services::find($menuItem->ref)->alias); @endphp
@break
@case ('single_link')
@php $menuItem->link = config('app.url') . $menuItem->ref; @endphp
@break
@default
@php $menuItem->link = config('app.url') . $menuItem->ref; @endphp
@break
@endswitch
@if ($menuItem->children->isNotEmpty())
<li class="has-dropdown">
<a class="dropdown-toggle"
href="javascript:void(0)">{{ $menuItem->title }}</a>
<ul class="submenu">
@foreach ($menuItem->children as $subMenu)
@switch($subMenu->type)
@case ('tbl_news')
@php $subMenu->link = route('showNews', News::find($subMenu->ref)->alias); @endphp
@break
@case ('tbl_franchises')
@php $subMenu->link = route('showFranchise', Franchises::find($subMenu->ref)->alias); @endphp
@break
@case ('tbl_companyarticles')
@php $subMenu->link = route('article.single', Companyarticles::find($subMenu->ref)->alias); @endphp
@break
@case ('tbl_services')
@php $subMenu->link = route('showService', Services::find($subMenu->ref)->alias); @endphp
@break
@default
@php $subMenu->link = config('app.url') . $subMenu->ref; @endphp
@break
@endswitch
<li class="nav-item">
<a href="{{ $subMenu->link }}"
class="nav-link">{{ $subMenu->title }}</a>
</li>
@endforeach
</ul>
</li>
@else
2024-05-08 08:17:40 +00:00
<li><a @if($menuItem->title =="Quote") class = "fh-btn btn" style="color:white;"@endif href="{{ $menuItem->link }}">{{ $menuItem->title }}</a></li>
2024-05-05 04:47:49 +00:00
@endif
@endforeach
</ul>
@endif
</nav>
</div>
</div>
<a href="#" class="navbar-toggle">
<span class="navbar-icon">
<span class="navbars-line"></span>
</span>
</a>
</div>
</div>
</header>