setting language

This commit is contained in:
Bayu Lukman Yusuf 2026-02-26 09:38:22 +07:00
parent f05b7378dc
commit f24e86061e
7 changed files with 30 additions and 6 deletions

View File

@ -4,6 +4,7 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Storage;
class StoreCategory extends Model
{
@ -32,4 +33,11 @@ class StoreCategory extends Model
{
return $this->items()->count();
}
public function getImageUrlAttribute()
{
return $this->image ? Storage::disk('wms')->url($this->image) : null;
}
}

View File

@ -2,4 +2,6 @@
return [
'title' => 'Popular Products',
'category' => 'Categories',
'view_all' => 'View All',
];

View File

@ -0,0 +1,6 @@
<?php
return [
'title' => 'Special Products',
'view_all' => 'View All'
];

View File

@ -2,4 +2,6 @@
return [
'title' => 'Produk Populer',
'category' => 'Kategori',
'view_all' => 'Lihat Semua',
];

View File

@ -0,0 +1,6 @@
<?php
return [
'title' => 'Produk Spesial',
'view_all' => 'Lihat Semua'
];

View File

@ -3,7 +3,7 @@
<!-- Categories list -->
<div class="col-lg-3 pb-2 pb-sm-3 pb-md-4 mb-5 mb-lg-0">
<h2 class="h3 border-bottom pb-3 pb-md-4 mb-4">Categories</h2>
<h2 class="h3 border-bottom pb-3 pb-md-4 mb-4">{{ __('home_popular_products.category') }}</h2>
<div class="row nav g-3 g-sm-4">
@foreach ($categories as $key => $value)
@ -12,7 +12,7 @@
<div class="position-relative d-flex min-w-0 align-items-center">
<div class="d-flex flex-shrink-0 align-items-center justify-content-center bg-body-tertiary rounded-circle"
style="width: 56px; height: 56px">
<img src="{{ asset('logo/logo-app.png') }}" width="40" alt="Image">
<img src="{{ $value->image_url }}" width="40" alt="Image">
</div>
<div class="min-w-0 ps-3">
<a class="nav-link animate-underline stretched-link fs-base fw-semibold p-0 mb-1"
@ -34,10 +34,10 @@
<div class="col-lg-9">
<div class="d-flex align-items-center justify-content-between border-bottom pb-3 pb-md-4 mb-3 mb-lg-4">
<h2 class="h3 mb-0">Popular products</h2>
<h2 class="h3 mb-0">{{ __('home_popular_products.title') }}</h2>
<div class="nav ms-3">
<a class="nav-link animate-underline px-0 py-2" href="{{ route('product.index') }}">
<span class="animate-target">View all</span>
<span class="animate-target">{{ __('home_popular_products.view_all') }}</span>
<i class="ci-chevron-right fs-base ms-1"></i>
</a>
</div>

View File

@ -24,10 +24,10 @@
<!-- Special products carousel -->
<div class="col-sm-7 col-md-8 col-lg-9">
<div class="d-flex align-items-center justify-content-between border-bottom pb-3 pb-md-4 mb-3 mb-lg-4">
<h2 class="h3 mb-0">Special products</h2>
<h2 class="h3 mb-0">{{ __('special_product.title') }}</h2>
<div class="nav ms-3">
<a class="nav-link animate-underline px-0 py-2" href="{{ route('product.index') }}">
<span class="animate-target text-nowrap">View all</span>
<span class="animate-target text-nowrap">{{ __('special_product.view_all') }}</span>
<i class="ci-chevron-right fs-base ms-1"></i>
</a>
</div>