80 lines
4.0 KiB
PHP
80 lines
4.0 KiB
PHP
@extends('layouts.frontend')
|
|
|
|
@section('title', 'Belanja Sayur')
|
|
|
|
@section('content')
|
|
<!-- Breadcrumb Section -->
|
|
<section class="breadcrumb-section set-bg" data-setbg="{{ asset('template/frontend/img/breadcrumb.jpg') }}" style="background-color: #7fad39; padding: 40px 0;">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-lg-12 text-center">
|
|
<div class="breadcrumb__text">
|
|
<h2 style="color: white; font-weight: 700;">Belanja Segar</h2>
|
|
<div class="breadcrumb__option">
|
|
<a href="{{ route('home') }}" style="color: white;">Home</a>
|
|
<span style="color: white;">Shop</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Product Section -->
|
|
<section class="product spad" style="padding-top: 50px; padding-bottom: 50px;">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-lg-3 col-md-5">
|
|
<div class="sidebar">
|
|
<div class="sidebar__item">
|
|
<h4>Pencarian</h4>
|
|
<form action="{{ route('shop') }}" method="GET">
|
|
<div class="input-group mb-3">
|
|
<input type="text" name="search" class="form-control" placeholder="Cari produk..." value="{{ request('search') }}">
|
|
<button class="btn btn-success" type="submit"><i class="fa fa-search"></i></button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-9 col-md-7">
|
|
<div class="row">
|
|
@forelse($produks as $produk)
|
|
<div class="col-lg-4 col-md-6 col-sm-6">
|
|
<div class="product__item">
|
|
<div class="product__item__pic set-bg"
|
|
style="background-image: url('{{ $produk->foto_produk ? asset('storage/'.$produk->foto_produk) : 'https://via.placeholder.com/300' }}');
|
|
height: 270px; background-size: cover; background-position: center; margin-bottom: 20px;">
|
|
<ul class="product__item__pic__hover" style="list-style: none; text-align: center;">
|
|
<li style="display: inline-block; margin-right: 10px;">
|
|
<a href="{{ route('produk.detail', $produk->id) }}" class="btn btn-light rounded-circle"><i class="fa fa-eye"></i></a>
|
|
</li>
|
|
<li style="display: inline-block;">
|
|
<a href="#" class="btn btn-success rounded-circle"><i class="fa fa-shopping-cart"></i></a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="product__item__text" style="text-align: center;">
|
|
<h6><a href="{{ route('produk.detail', $produk->id) }}" style="color: #252525; font-weight: 700; text-decoration: none;">{{ $produk->nama_produk }}</a></h6>
|
|
<h5 style="color: #252525; font-weight: 700;">Rp {{ number_format($produk->harga, 0, ',', '.') }}</h5>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@empty
|
|
<div class="col-12 text-center">
|
|
<div class="alert alert-warning">Produk tidak ditemukan.</div>
|
|
</div>
|
|
@endforelse
|
|
</div>
|
|
|
|
<!-- Pagination -->
|
|
<div class="row">
|
|
<div class="col-12 d-flex justify-content-center">
|
|
{{ $produks->links() }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
@endsection |