Implement Product and ProductCategory Resources: Created new Filament resources for managing products and product categories, including pages for listing, creating, and editing. Added schemas for forms and tables, integrated translation support, and established relationships between products and categories. Enhanced the navigation structure to include product and service links in the frontend menu, improving overall site organization and user experience.

This commit is contained in:
Ümit Tunç
2025-12-30 22:16:45 +03:00
parent a5a3248c69
commit a85e6eebe0
33 changed files with 1919 additions and 549 deletions
@@ -24,54 +24,103 @@ $menuItems = \App\Models\Page::with(['children' => function ($query) {
@foreach($menuItems as $item)
@php
$hasChildren = $item->children->isNotEmpty();
$isMegaMenu = $item->slug === 'urunlerimiz';
@endphp
<li class="nav-item {{ $hasChildren ? 'dropdown' : '' }}">
@if($hasChildren)
<a class="nav-link dropdown-toggle font-bold !tracking-[normal] hover:!text-[#e31e24] !text-[.85rem]"
href="{{ route('page.show', $item->slug) }}"
data-bs-toggle="dropdown">
{{ $item->translate('title') ?: $item->title }}
</a>
<ul class="dropdown-menu">
@foreach($item->children as $child)
@php
$childHasChildren = $child->children->isNotEmpty();
@endphp
@if($childHasChildren)
<li class="dropdown dropdown-submenu dropend">
<a class="dropdown-item hover:!text-[#e31e24] dropdown-toggle"
href="{{ route('page.show', $child->slug) }}"
data-bs-toggle="dropdown">
{{ $child->translate('title') ?: $child->title }}
</a>
<ul class="dropdown-menu">
@foreach($child->children as $grandChild)
<li class="nav-item">
<a class="dropdown-item hover:!text-[#e31e24]"
href="{{ route('page.show', $grandChild->slug) }}">
{{ $grandChild->translate('title') ?: $grandChild->title }}
</a>
</li>
@endforeach
@if($isMegaMenu)
<li class="nav-item dropdown dropdown-mega">
<a class="nav-link dropdown-toggle font-bold !tracking-[-0.01rem] hover:!text-[#e31e24] after:!text-[#e31e24]" href="{{ route('page.show', $item->slug) }}" data-bs-toggle="dropdown">{{ $item->translate('title') ?: $item->title }}</a>
<ul class="dropdown-menu mega-menu">
<li class="mega-menu-content">
<div class="flex flex-wrap mx-0 xl:mx-[-7.5px] lg:mx-[-7.5px]">
<div class="xl:w-4/12 lg:w-4/12 w-full flex-[0_0_auto] max-w-full">
<h6 class="dropdown-header !text-[#e31e24]">Kategoriler</h6>
<ul class="pl-0 list-none xl:columns-2 lg:columns-2 xl:pb-1 lg:pb-1">
<li class="xl:inline-block xl:w-full lg:inline-block lg:w-full"><a class='dropdown-item hover:!text-[#e31e24]' href='#'>Yazılım Çözümleri</a></li>
<li class="xl:inline-block xl:w-full lg:inline-block lg:w-full"><a class='dropdown-item hover:!text-[#e31e24]' href='#'>Donanım</a></li>
<li class="xl:inline-block xl:w-full lg:inline-block lg:w-full"><a class='dropdown-item hover:!text-[#e31e24]' href='#'>Danışmanlık</a></li>
<li class="xl:inline-block xl:w-full lg:inline-block lg:w-full"><a class='dropdown-item hover:!text-[#e31e24]' href='#'>Entegrasyon</a></li>
</ul>
</li>
@else
<li class="nav-item">
<a class="dropdown-item hover:!text-[#e31e24]"
href="{{ route('page.show', $child->slug) }}">
{{ $child->translate('title') ?: $child->title }}
</a>
</li>
@endif
@endforeach
<h6 class="dropdown-header !text-[#e31e24] xl:!mt-6 lg:!mt-6">Sektörler</h6>
<ul class="pl-0 list-none xl:columns-2 lg:columns-2">
<li class="xl:inline-block xl:w-full lg:inline-block lg:w-full"><a class='dropdown-item hover:!text-[#e31e24]' href='#'>Finans</a></li>
<li class="xl:inline-block xl:w-full lg:inline-block lg:w-full"><a class='dropdown-item hover:!text-[#e31e24]' href='#'>Sağlık</a></li>
<li class="xl:inline-block xl:w-full lg:inline-block lg:w-full"><a class='dropdown-item hover:!text-[#e31e24]' href='#'>Eğitim</a></li>
<li class="xl:inline-block xl:w-full lg:inline-block lg:w-full"><a class='dropdown-item hover:!text-[#e31e24]' href='#'>Perakende</a></li>
</ul>
</div>
<!--/column -->
<div class="xl:w-8/12 lg:w-8/12 w-full flex-[0_0_auto] max-w-full xl:border-l-[rgba(164,174,198,0.2)] xl:border-l xl:border-solid lg:border-l-[rgba(164,174,198,0.2)] lg:border-l lg:border-solid">
<h6 class="dropdown-header !text-[#e31e24]">Öne Çıkan Ürünler</h6>
<ul class="pl-0 list-none xl:columns-3 lg:columns-3">
<li><a class='dropdown-item hover:!text-[#e31e24]' href='#'>ERP Sistemi</a></li>
<li><a class='dropdown-item hover:!text-[#e31e24]' href='#'>CRM Modülü</a></li>
<li><a class='dropdown-item hover:!text-[#e31e24]' href='#'>Mobil App</a></li>
<li><a class='dropdown-item hover:!text-[#e31e24]' href='#'>Web Sitesi</a></li>
<li><a class='dropdown-item hover:!text-[#e31e24]' href='#'>E-Ticaret</a></li>
<li><a class='dropdown-item hover:!text-[#e31e24]' href='#'>SEO Paketi</a></li>
<li><a class='dropdown-item hover:!text-[#e31e24]' href='#'>Hosting</a></li>
<li><a class='dropdown-item hover:!text-[#e31e24]' href='#'>Bulut Yedekleme</a></li>
<li><a class='dropdown-item hover:!text-[#e31e24]' href='#'>Siber Güvenlik</a></li>
</ul>
</div>
<!--/column -->
</div>
<!--/.row -->
</li>
<!--/.mega-menu-content-->
</ul>
@else
<a class="nav-link font-bold !tracking-[normal] hover:!text-[#e31e24] !text-[.85rem]"
href="{{ route('page.show', $item->slug) }}">
{{ $item->translate('title') ?: $item->title }}
</a>
@endif
</li>
<!--/.dropdown-menu -->
</li>
@else
<li class="nav-item {{ $hasChildren ? 'dropdown' : '' }}">
@if($hasChildren)
<a class="nav-link dropdown-toggle font-bold !tracking-[-0.01rem] hover:!text-[#e31e24] after:!text-[#e31e24]"
href="{{ route('page.show', $item->slug) }}"
data-bs-toggle="dropdown">
{{ $item->translate('title') ?: $item->title }}
</a>
<ul class="dropdown-menu">
@foreach($item->children as $child)
@php
$childHasChildren = $child->children->isNotEmpty();
@endphp
@if($childHasChildren)
<li class="dropdown dropdown-submenu dropend">
<a class="dropdown-item hover:!text-[#e31e24] dropdown-toggle"
href="{{ route('page.show', $child->slug) }}"
data-bs-toggle="dropdown">
{{ $child->translate('title') ?: $child->title }}
</a>
<ul class="dropdown-menu">
@foreach($child->children as $grandChild)
<li class="nav-item">
<a class="dropdown-item hover:!text-[#e31e24]"
href="{{ route('page.show', $grandChild->slug) }}">
{{ $grandChild->translate('title') ?: $grandChild->title }}
</a>
</li>
@endforeach
</ul>
</li>
@else
<li class="nav-item">
<a class="dropdown-item hover:!text-[#e31e24]"
href="{{ route('page.show', $child->slug) }}">
{{ $child->translate('title') ?: $child->title }}
</a>
</li>
@endif
@endforeach
</ul>
@else
<a class="nav-link font-bold !tracking-[-0.01rem] hover:!text-[#e31e24] after:!text-[#e31e24]"
href="{{ route('page.show', $item->slug) }}">
{{ $item->translate('title') ?: $item->title }}
</a>
@endif
</li>
@endif
@endforeach
</ul>
@endif
@endif
@@ -0,0 +1,54 @@
<footer class="bg-[rgba(255,255,255)] opacity-100">
<div class="container pt-8 xl:pt-10 lg:pt-10 md:pt-10 pb-7">
<div class="flex flex-wrap mx-[-15px] xl:mx-0 lg:mx-0 !mt-[-30px]">
<div class="xl:w-4/12 lg:w-4/12 w-full flex-[0_0_auto] !px-[15px] max-w-full xl:px-0 lg:px-0 !mt-[30px]">
<div class="widget">
<img class="!mb-4" src="{{ asset('html/assets/img/truncgil-yatay.svg') }}" alt="Trunçgil Teknoloji">
<p class="lead text-[0.9rem] font-medium !leading-[1.65] !mb-0">5000+ mutlu müşteri ile güvenilir teknoloji ortağınız.</p>
</div>
</div>
<div class="xl:w-3/12 lg:w-3/12 w-full flex-[0_0_auto] !px-[15px] max-w-full xl:!ml-[16.66666667%] lg:!ml-[16.66666667%] xl:px-0 lg:px-0 !mt-[30px]">
<div class="widget">
<div class="flex flex-row">
<div>
<div class="icon !text-[#e31e24] xl:!text-[1.4rem] !text-[calc(1.265rem_+_0.18vw)] !mr-4 !mt-[-0.25rem]"> <i class="uil uil-phone-volume before:content-['\ec50']"></i> </div>
</div>
<div>
<h5 class="!mb-1">Telefon</h5>
<p class="!mb-0">00 (123) 456 78 90 <br>00 (987) 654 32 10</p>
</div>
</div>
</div>
</div>
<div class="xl:w-3/12 lg:w-3/12 w-full flex-[0_0_auto] !px-[15px] max-w-full xl:px-0 lg:px-0 !mt-[30px]">
<div class="widget">
<div class="flex flex-row">
<div>
<div class="icon !text-[#e31e24] xl:!text-[1.4rem] !text-[calc(1.265rem_+_0.18vw)] !mr-4 !mt-[-0.25rem]"> <i class="uil uil-location-pin-alt before:content-['\ebd8']"></i> </div>
</div>
<div class="!self-start !justify-start">
<h5 class="!mb-1">Adres</h5>
<address class=" not-italic !leading-[inherit] !mb-4">ÇAMTEPE MAH. MAHMUT TEVFİK ATAY BUL. GAZİANTEP TEKNOPARK NO: 4A İÇ KAPI NO: 1 ŞAHİNBEY / GAZİANTEP</address>
</div>
</div>
</div>
</div>
</div>
<hr class="!mt-13 xl:!mt-[4.5rem] lg:!mt-[4.5rem] md:!mt-[4.5rem] !mb-7">
<div class="xl:!flex lg:!flex md:!flex items-center justify-between">
<p class="!mb-2 xl:!mb-0 lg:!mb-0">© 2025 Trunçgil Teknoloji. Tüm hakları saklıdır.</p>
<nav class="nav social social-muted !mb-0 xl:!text-right lg:!text-right md:!text-right">
<a class="m-[0_0_0_.7rem] max-md:m-[0_.7rem_0_0] text-[1rem] transition-all duration-[0.2s] ease-in-out translate-y-0 hover:translate-y-[-0.15rem]" href="#"><i class="uil uil-twitter before:content-['\ed59'] text-[1rem] !text-[#5daed5]"></i></a>
<a class="m-[0_0_0_.7rem] max-md:m-[0_.7rem_0_0] text-[1rem] transition-all duration-[0.2s] ease-in-out translate-y-0 hover:translate-y-[-0.15rem]" href="#"><i class="uil uil-facebook-f before:content-['\eae2'] text-[1rem] !text-[#4470cf]"></i></a>
<a class="m-[0_0_0_.7rem] max-md:m-[0_.7rem_0_0] text-[1rem] transition-all duration-[0.2s] ease-in-out translate-y-0 hover:translate-y-[-0.15rem]" href="#"><i class="uil uil-dribbble before:content-['\eaa2'] text-[1rem] !text-[#e94d88]"></i></a>
<a class="m-[0_0_0_.7rem] max-md:m-[0_.7rem_0_0] text-[1rem] transition-all duration-[0.2s] ease-in-out translate-y-0 hover:translate-y-[-0.15rem]" href="#"><i class="uil uil-instagram before:content-['\eb9c'] text-[1rem] !text-[#d53581]"></i></a>
<a class="m-[0_0_0_.7rem] max-md:m-[0_.7rem_0_0] text-[1rem] transition-all duration-[0.2s] ease-in-out translate-y-0 hover:translate-y-[-0.15rem]" href="#"><i class="uil uil-youtube before:content-['\edb5'] text-[1rem] !text-[#c8312b]"></i></a>
</nav>
</div>
</div>
</footer>
@@ -0,0 +1,46 @@
<header class="relative wrapper !bg-[#f0f0f8]">
<nav class="navbar navbar-expand-lg center-nav transparent navbar-light">
<div class="container xl:!flex-row lg:!flex-row !flex-nowrap items-center">
<div class="navbar-brand w-full">
<a href='{{ url('/') }}'>
<img src="{{ asset('html/assets/img/truncgil-yatay.svg') }}" alt="Trunçgil Teknoloji">
</a>
</div>
<div class="navbar-collapse offcanvas offcanvas-nav offcanvas-start">
<div class="offcanvas-header xl:!hidden lg:!hidden flex items-center justify-between flex-row p-6">
<h3 class="text-white xl:!text-[1.5rem] !text-[calc(1.275rem_+_0.3vw)] !mb-0">Trunçgil</h3>
<button type="button" class="btn-close btn-close-white mr-[-0.75rem] m-0 p-0" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body xl:!ml-auto lg:!ml-auto flex flex-col !h-full">
<x-custom.menu />
<div class="offcanvas-footer xl:!hidden lg:!hidden">
<div>
<a href="mailto:info@truncgil.com" class="link-inverse">info@truncgil.com</a>
<br> 00 (123) 456 78 90 <br>
<nav class="nav social social-white !mt-4">
<a class="!text-[#cacaca] text-[1rem] transition-all duration-[0.2s] ease-in-out translate-y-0 motion-reduce:transition-none hover:translate-y-[-0.15rem] m-[0_.7rem_0_0]" href="#"><i class="uil uil-twitter before:content-['\ed59'] !text-white text-[1rem]"></i></a>
<a class="!text-[#cacaca] text-[1rem] transition-all duration-[0.2s] ease-in-out translate-y-0 motion-reduce:transition-none hover:translate-y-[-0.15rem] m-[0_.7rem_0_0]" href="#"><i class="uil uil-facebook-f before:content-['\eae2'] !text-white text-[1rem]"></i></a>
<a class="!text-[#cacaca] text-[1rem] transition-all duration-[0.2s] ease-in-out translate-y-0 motion-reduce:transition-none hover:translate-y-[-0.15rem] m-[0_.7rem_0_0]" href="#"><i class="uil uil-dribbble before:content-['\eaa2'] !text-white text-[1rem]"></i></a>
<a class="!text-[#cacaca] text-[1rem] transition-all duration-[0.2s] ease-in-out translate-y-0 motion-reduce:transition-none hover:translate-y-[-0.15rem] m-[0_.7rem_0_0]" href="#"><i class="uil uil-instagram before:content-['\eb9c'] !text-white text-[1rem]"></i></a>
<a class="!text-[#cacaca] text-[1rem] transition-all duration-[0.2s] ease-in-out translate-y-0 motion-reduce:transition-none hover:translate-y-[-0.15rem] m-[0_.7rem_0_0]" href="#"><i class="uil uil-youtube before:content-['\edb5'] !text-white text-[1rem]"></i></a>
</nav>
</div>
</div>
</div>
</div>
<div class="navbar-other w-full !flex !ml-auto">
<ul class="navbar-nav !flex-row !items-center !ml-auto">
<li class="nav-item hidden xl:block lg:block md:block">
<a href="#" class="btn btn-sm btn-grape !text-white !bg-[#e31e24] border-[#e31e24] hover:text-white hover:bg-[#e31e24] hover:!border-[#e31e24] active:text-white active:bg-[#e31e24] active:border-[#e31e24] disabled:text-white disabled:bg-[#e31e24] disabled:border-[#e31e24] rounded">Hemen Teklif Al</a>
</li>
<li class="nav-item xl:!hidden lg:!hidden">
<button class="hamburger offcanvas-nav-btn"><span></span></button>
</li>
</ul>
</div>
</div>
</nav>
</header>