setting language
This commit is contained in:
parent
f05b7378dc
commit
f24e86061e
|
|
@ -4,6 +4,7 @@ namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
||||||
class StoreCategory extends Model
|
class StoreCategory extends Model
|
||||||
{
|
{
|
||||||
|
|
@ -32,4 +33,11 @@ class StoreCategory extends Model
|
||||||
{
|
{
|
||||||
return $this->items()->count();
|
return $this->items()->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getImageUrlAttribute()
|
||||||
|
{
|
||||||
|
return $this->image ? Storage::disk('wms')->url($this->image) : null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,6 @@
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'title' => 'Popular Products',
|
'title' => 'Popular Products',
|
||||||
|
'category' => 'Categories',
|
||||||
|
'view_all' => 'View All',
|
||||||
];
|
];
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'title' => 'Special Products',
|
||||||
|
'view_all' => 'View All'
|
||||||
|
];
|
||||||
|
|
@ -2,4 +2,6 @@
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'title' => 'Produk Populer',
|
'title' => 'Produk Populer',
|
||||||
|
'category' => 'Kategori',
|
||||||
|
'view_all' => 'Lihat Semua',
|
||||||
];
|
];
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'title' => 'Produk Spesial',
|
||||||
|
'view_all' => 'Lihat Semua'
|
||||||
|
];
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
<!-- Categories list -->
|
<!-- Categories list -->
|
||||||
<div class="col-lg-3 pb-2 pb-sm-3 pb-md-4 mb-5 mb-lg-0">
|
<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">
|
<div class="row nav g-3 g-sm-4">
|
||||||
|
|
||||||
@foreach ($categories as $key => $value)
|
@foreach ($categories as $key => $value)
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
<div class="position-relative d-flex min-w-0 align-items-center">
|
<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"
|
<div class="d-flex flex-shrink-0 align-items-center justify-content-center bg-body-tertiary rounded-circle"
|
||||||
style="width: 56px; height: 56px">
|
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>
|
||||||
<div class="min-w-0 ps-3">
|
<div class="min-w-0 ps-3">
|
||||||
<a class="nav-link animate-underline stretched-link fs-base fw-semibold p-0 mb-1"
|
<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="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">
|
<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">
|
<div class="nav ms-3">
|
||||||
<a class="nav-link animate-underline px-0 py-2" href="{{ route('product.index') }}">
|
<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>
|
<i class="ci-chevron-right fs-base ms-1"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -24,10 +24,10 @@
|
||||||
<!-- Special products carousel -->
|
<!-- Special products carousel -->
|
||||||
<div class="col-sm-7 col-md-8 col-lg-9">
|
<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">
|
<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">
|
<div class="nav ms-3">
|
||||||
<a class="nav-link animate-underline px-0 py-2" href="{{ route('product.index') }}">
|
<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>
|
<i class="ci-chevron-right fs-base ms-1"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue