diff --git a/app/Livewire/Home/Index.php b/app/Livewire/Home/Index.php
index 6534aaf..6dabc84 100644
--- a/app/Livewire/Home/Index.php
+++ b/app/Livewire/Home/Index.php
@@ -27,7 +27,7 @@ public function mount()
{
$this->brands = Brand::orderBy('sort_order')
->get()
- ->map(fn(Brand $brand) => [
+ ->map(fn (Brand $brand) => [
'name' => $brand->name,
'image' => $brand->getFirstMediaUrl('image') ? Storage::url($brand->getFirstMediaUrl('image')) : asset('assets/images/logo.png'),
])
@@ -35,7 +35,7 @@ public function mount()
$this->perfumeFeatures = PerfumeFeature::orderBy('sort_order')
->get()
- ->map(fn(PerfumeFeature $perfumeFeature) => [
+ ->map(fn (PerfumeFeature $perfumeFeature) => [
'name' => $perfumeFeature->name,
'description' => $perfumeFeature->description,
])
@@ -43,7 +43,7 @@ public function mount()
$this->faqs = Faq::orderBy('sort_order')
->get()
- ->map(fn(Faq $faq) => [
+ ->map(fn (Faq $faq) => [
'question' => $faq->question,
'answer' => $faq->answer,
])
@@ -51,7 +51,7 @@ public function mount()
$this->whyChooseUs = ChooseUs::orderBy('sort_order')
->get()
- ->map(fn(ChooseUs $chooseUs) => [
+ ->map(fn (ChooseUs $chooseUs) => [
'name' => $chooseUs->name,
'description' => $chooseUs->description,
])
@@ -64,7 +64,7 @@ public function render()
'pageTitle' => 'Beranda',
]);
}
-
+
public function goToProduct()
{
return redirect('/product');
diff --git a/app/Livewire/Home/Outlet.php b/app/Livewire/Home/Outlet.php
new file mode 100644
index 0000000..2ce56cc
--- /dev/null
+++ b/app/Livewire/Home/Outlet.php
@@ -0,0 +1,17 @@
+ 'Outlet',
+])]
+class Outlet extends Component
+{
+ public function render()
+ {
+ return view('livewire.home.outlets');
+ }
+}
diff --git a/app/Livewire/Home/Product/Index.php b/app/Livewire/Home/Product/Index.php
index ceb685a..c0713a1 100644
--- a/app/Livewire/Home/Product/Index.php
+++ b/app/Livewire/Home/Product/Index.php
@@ -10,7 +10,6 @@
])]
class Index extends Component
{
-
public function render()
{
return view('livewire.home.product.index');
diff --git a/app/Providers/ViewServiceProvider.php b/app/Providers/ViewServiceProvider.php
index 9b1a7df..8a84d39 100644
--- a/app/Providers/ViewServiceProvider.php
+++ b/app/Providers/ViewServiceProvider.php
@@ -262,7 +262,65 @@ public function boot(): void
],
];
- $view->with('sidebar', $sidebar);
+ $header = [
+ [
+ 'title' => 'Beranda',
+ 'type' => 'link',
+ 'route' => 'homepage',
+ 'match' => 'homepage',
+ ],
+ [
+ 'title' => 'Outlet',
+ 'type' => 'link',
+ 'route' => 'outlet',
+ 'match' => 'outlet',
+ ],
+ [
+ 'title' => 'Produk',
+ 'type' => 'dropdown',
+ 'action' => 'goToProduct',
+ 'items' => [
+ [
+ 'title' => 'Parfum',
+ 'route' => 'product.perfume.index',
+ 'match' => 'product.perfume.*',
+ ],
+ [
+ 'title' => 'Botol',
+ 'route' => 'product.bottle.index',
+ 'match' => 'product.bottle.*',
+ ],
+ [
+ 'title' => 'Arabian',
+ 'route' => 'product.arabian.index',
+ 'match' => 'product.arabian.*',
+ ],
+ ],
+ ],
+ [
+ 'title' => 'Voucher',
+ 'type' => 'link',
+ 'route' => 'voucher.index',
+ 'match' => 'voucher.*',
+ ],
+ [
+ 'title' => 'Artikel',
+ 'type' => 'link',
+ 'route' => 'article.index',
+ 'match' => 'article.*',
+ ],
+ [
+ 'title' => 'FAQ',
+ 'type' => 'link',
+ 'route' => 'faq',
+ 'match' => 'faq',
+ ],
+ ];
+
+ $view->with([
+ 'sidebar' => $sidebar,
+ 'header' => $header,
+ ]);
});
}
}
diff --git a/resources/views/components/layouts/home.blade.php b/resources/views/components/layouts/home.blade.php
index 993be2b..a64934a 100644
--- a/resources/views/components/layouts/home.blade.php
+++ b/resources/views/components/layouts/home.blade.php
@@ -1,20 +1,175 @@
-
+
-
- @include('components.partials.home._meta')
- @include('components.partials.home._css')
-
+
+
+
+ {{ $title }} | {{ config('app.name') }}
+ @vite(['resources/css/app.css', 'resources/js/app.js'])
+ @fluxAppearance
+
+
+
+
-
+
+ @include('components.partials.home._header')
- @include("components.partials.home._header")
-
- {{ $slot }}
-
- @include("components.partials.home._footer")
-
- @include('components.partials.home._js')
-
+ @persist('toast')
+
+ @endpersist
+
+ {{ $slot }}
+ @fluxScripts
+
+
+
+
diff --git a/resources/views/components/partials/home/_css.blade.php b/resources/views/components/partials/home/_css.blade.php
deleted file mode 100644
index bbc4350..0000000
--- a/resources/views/components/partials/home/_css.blade.php
+++ /dev/null
@@ -1,6 +0,0 @@
-{{--
-
-
-
- --}}
-@vite(['resources/css/app.css', 'resources/js/app.js'])
\ No newline at end of file
diff --git a/resources/views/components/partials/home/_header.blade.php b/resources/views/components/partials/home/_header.blade.php
index de28c05..7fd754b 100644
--- a/resources/views/components/partials/home/_header.blade.php
+++ b/resources/views/components/partials/home/_header.blade.php
@@ -26,27 +26,38 @@ class="w-10 h-8 lg:w-16 lg:h-12 transition-all duration-500">