diff --git a/app/View/Components/FooterCategory.php b/app/View/Components/FooterCategory.php new file mode 100644 index 0000000..5a9e014 --- /dev/null +++ b/app/View/Components/FooterCategory.php @@ -0,0 +1,29 @@ +categories = $categoryRepository->getList([]); + } + + /** + * Get the view / contents that represent the component. + */ + public function render(): View|Closure|string + { + return view('components.footer-category', ['categories' => $this->categories]); + } +} diff --git a/lang/en/footer.php b/lang/en/footer.php new file mode 100644 index 0000000..9753b82 --- /dev/null +++ b/lang/en/footer.php @@ -0,0 +1,19 @@ + 'Computers', + 'smartphones' => 'Smartphones', + 'tv_video' => 'TV, Video', + 'speakers' => 'Speakers', + 'cameras' => 'Cameras', + 'printers' => 'Printers', + 'video_games' => 'Video Games', + 'headphones' => 'Headphones', + 'wearable' => 'Wearable', + 'hdd_ssd' => 'HDD/SSD', + 'smart_home' => 'Smart Home', + 'apple_devices' => 'Apple Devices', + 'tablets' => 'Tablets', + 'monitors' => 'Monitors', + 'scanners' => 'Scanners' +]; diff --git a/lang/en/home_popular_products.php b/lang/en/home_popular_products.php new file mode 100644 index 0000000..5e87aca --- /dev/null +++ b/lang/en/home_popular_products.php @@ -0,0 +1,5 @@ + 'Popular Products', +]; \ No newline at end of file diff --git a/lang/id/footer.php b/lang/id/footer.php new file mode 100644 index 0000000..48da05b --- /dev/null +++ b/lang/id/footer.php @@ -0,0 +1,19 @@ + 'Komputer', + 'smartphones' => 'Smartphone', + 'tv_video' => 'TV, Video', + 'speakers' => 'Speaker', + 'cameras' => 'Kamera', + 'printers' => 'Printer', + 'video_games' => 'Game Video', + 'headphones' => 'Headphone', + 'wearable' => 'Perangkat Wearable', + 'hdd_ssd' => 'HDD/SSD', + 'smart_home' => 'Smart Home', + 'apple_devices' => 'Perangkat Apple', + 'tablets' => 'Tablet', + 'monitors' => 'Monitor', + 'scanners' => 'Scanner' +]; diff --git a/lang/id/home_popular_products.php b/lang/id/home_popular_products.php new file mode 100644 index 0000000..eaaf1d6 --- /dev/null +++ b/lang/id/home_popular_products.php @@ -0,0 +1,5 @@ + 'Produk Populer', +]; \ No newline at end of file diff --git a/resources/views/components/footer-category.blade.php b/resources/views/components/footer-category.blade.php new file mode 100644 index 0000000..42dd5e7 --- /dev/null +++ b/resources/views/components/footer-category.blade.php @@ -0,0 +1,12 @@ +@if($categories && $categories->count() > 0) + +@endif \ No newline at end of file diff --git a/resources/views/components/home/home-popular-products.blade.php b/resources/views/components/home/home-popular-products.blade.php index f7f5d03..ac477ee 100644 --- a/resources/views/components/home/home-popular-products.blade.php +++ b/resources/views/components/home/home-popular-products.blade.php @@ -5,7 +5,7 @@
-

Popular products

+

{{ __('home_popular_products.title') }}

diff --git a/resources/views/layouts/partials/footer.blade.php b/resources/views/layouts/partials/footer.blade.php index 09a0349..c46e3e6 100644 --- a/resources/views/layouts/partials/footer.blade.php +++ b/resources/views/layouts/partials/footer.blade.php @@ -150,57 +150,7 @@