@extends('frontend::layouts.master') @section('title') @section('style') @endsection @section('content') @if (!empty($pageInit['pbanner']) && count($pageInit['pbanner']) > 0) @foreach ($pageInit['pbanner'] as $banner) @if ($banner->type == 1) {{-- Desktop --}} {{-- Mobile --}} @if (!empty($banner->url)) @endif @else @if ($banner->video_type == 1) @if (CheckFileInServer($banner->image)) @endif @else @endif @endif @endforeach @endif {{-- Section : Lastest Item --}} @if (!empty($pageInit['pproduct']) && count($pageInit['pproduct']) > 0) @lang('frontend.frnd_30') @foreach ($pageInit['pproduct'] as $k => $product) @if (!empty($product->items_only) && !empty($product->items_only[0]->images)) @else @endif @if (!empty($product->status_new)) @if (!empty($product->labels)) @foreach (json_decode($product->labels) as $item) {{ $item->title }} @endforeach @endif @endif @if (Auth::guard('member')->check()) @else @endif @endforeach @endif {{-- ใส่ BG หรือ Video ก็ได้ --}} @if (!empty($pageInit['pbanner_page1']) && $pageInit['pbanner_page1']->status == 1) @if ($pageInit['pbanner_page1']->type == 2) @if (!empty($pageInit['pbanner_page1']->video_1)) @endif @elseif ($pageInit['pbanner_page1']->type == 3) @if (!empty($pageInit['pbanner_page1']->link_1)) {{-- ถ้าเป็น Youtube iframe เติม "?rel=0&autoplay=1&mute=1" หลังURLให้ด้วย ให้มันเล่นอัตโนมัติ --}} @endif @else @if (!empty($pageInit['pbanner_page1']->image_1)) @endif @endif @endif {{-- Section : Blog --}} @if (!empty($pageInit['banner_ads'])) @foreach ($pageInit['banner_ads'] as $index => $tips) @if ($index <= 1) @if ($tips->type == 1) @elseif($tips->type == 2) @else {!! $tips->image_3 ?? '' !!} @endif {{ $tips['name_' . $pageInit['lang']] ?? '' }} {{ $tips['description_' . $pageInit['lang']] ?? '' }} @lang('frontend.frnd_31') @if (!empty($tips['url'])) @endif @endif @endforeach @foreach ($pageInit['banner_ads'] as $index => $tips) @if ($index >= 2) @if ($tips->type == 1) @elseif($tips->type == 2) @else @endif {{ $tips['name_' . $pageInit['lang']] ?? '' }} {{ $tips['description_' . $pageInit['lang']] ?? '' }} @lang('frontend.frnd_31') @if (!empty($tips['url'])) @endif @endif @endforeach @endif {{-- ใส่ BG หรือ Video ก็ได้ --}} @if (!empty($pageInit['pbanner_page2']) && $pageInit['pbanner_page2']->status == 1) @if ($pageInit['pbanner_page2']->type == 2) @elseif ($pageInit['pbanner_page2']->type == 3) {{-- ถ้าเป็น Youtube iframe เติม "?rel=0&autoplay=1&mute=1&controls=0&&showinfo=0&loop=1" หลังURLให้ด้วย ให้มันเล่นอัตโนมัติกับอื่น ๆ --}} @else @if (!empty($pageInit['pbanner_page2']->image_1)) @endif @endif @endif {{-- Section : Lastest Item --}} @if (!empty($pageInit['pcategory'])) @lang('frontend.frnd_32') @foreach ($pageInit['pcategory'] as $category) {{ !empty($category->status_new) ? 'NEW' : '' }} {{-- กรณียังไม่ล็อกอิน จะมี data-bs-toggle="modal" data-bs-target="#loginNotiModal" ใช้เรียก Modal --}} {{-- --}} {{ $category['name_' . $pageInit['lang']] ?? '' }} @endforeach @endif @endsection @section('script') @endsection
@foreach (json_decode($product->labels) as $item) {{ $item->title }} @endforeach
{{ !empty($category->status_new) ? 'NEW' : '' }}