Advertisement
last63

blade detail my transaction

May 23rd, 2024
667
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.27 KB | Fixit | 0 0
  1. @extends('layouts.parent')
  2.  
  3. @section('title', 'My Transaction')
  4.  
  5. @section('content')
  6.     <div class="card">
  7.         <div class="card-body">
  8.             <h5 class="card-title">My Transaction</h5>
  9.  
  10.             <nav>
  11.                 <ol class="breadcrumb">
  12.                     @if (Auth::user()->role == 'admin')
  13.                         <li class="breadcrumb-item"><a href="{{ route('admin.dashboard') }}">Dashboard</a></li>
  14.                     @else
  15.                         <li class="breadcrumb-item"><a href="{{ route('user.dashboard') }}">Dashboard</a></li>
  16.                     @endif
  17.                     <li class="breadcrumb-item"><a href="#">Transaction</a></li>
  18.                     <li class="breadcrumb-item active">My Transaction</li>
  19.                 </ol>
  20.             </nav>
  21.         </div>
  22.     </div>
  23.  
  24.     <div class="card">
  25.         <div class="card-body">
  26.             <h5 class="card-title">Detail Transaction</h5>
  27.  
  28.             <!-- Table with stripped rows -->
  29.             <table class="table table-striped">
  30.                 <thead>
  31.                     <tr>
  32.                         <th scope="col">Name Account</th>
  33.                         <td scope="col">
  34.                             {{ auth()->user()->name }}
  35.                         </td>
  36.                     </tr>
  37.                     <tr>
  38.                         <th scope="col">Reciever Name</th>
  39.                         <td scope="col">
  40.                             {{ $transaction->name }}
  41.                         </td>
  42.                     </tr>
  43.                     <tr>
  44.                         <th scope="row">Reciever Email</th>
  45.                         <td>{{ $transaction->email }}</td>
  46.                     </tr>
  47.                     <tr>
  48.                         <th scope="row">Reciever Phone</th>
  49.                         <td>{{ $transaction->phone }}</td>
  50.                     </tr>
  51.                     <tr>
  52.                         <th scope="row">Address</th>
  53.                         <td>{{ $transaction->address }}</td>
  54.                     </tr>
  55.                     <tr>
  56.                         <th scope="row">Corier</th>
  57.                         <td>{{ $transaction->courier }}</td>
  58.                     </tr>
  59.                     <tr>
  60.                         <th scope="row">Payment</th>
  61.                         <td>{{ $transaction->payment }}</td>
  62.                     </tr>
  63.                     <tr>
  64.                         <th scope="row">Payment URL</th>
  65.                         <td>
  66.                             <a href="{{ $transaction->payment_url }}" target="_blank">
  67.                                 {{ $transaction->payment_url }}
  68.                             </a>
  69.                         </td>
  70.                     <tr>
  71.                         <th scope="row">Status</th>
  72.                         <td>
  73.                             @if ($transaction->status == 'EXPIRED')
  74.                                 <span class="badge bg-danger text-uppercase">Expired</span>
  75.                             @elseif ($transaction->status == 'PENDING')
  76.                                 <span class="badge bg-warning text-uppercase">Pending</span>
  77.                             @elseif ($transaction->status == 'SETTLEMENT')
  78.                                 <span class="badge bg-info text-uppercase">Settlement</span>
  79.                             @else
  80.                                 <span class="badge bg-success text-uppercase">Success</span>
  81.                             @endif
  82.                         </td>
  83.                     </tr>
  84.                     <tr>
  85.                         <th scope="row">Total Price</th>
  86.                         <td>Rp. {{ number_format($transaction->total_price) }}</td>
  87.                     </tr>
  88.                 </thead>
  89.             </table>
  90.             <!-- End Table with stripped rows -->  
  91.  
  92.         </div>
  93.     </div>
  94.  
  95.     <div class="card">
  96.         <div class="card-body">
  97.             <h5 class="card-title">List Product</h5>
  98.  
  99.             <!-- Table with stripped rows -->
  100.             <table class="table table-striped">
  101.                 <thead>
  102.                     <tr>
  103.                         <th scope="col">No</th>
  104.                         <th scope="col">Name</th>
  105.                         <th scope="col">Price</th>
  106.                         <th scope="col">Image</th>
  107.                     </tr>
  108.                 </thead>
  109.                 <tbody>
  110.                     @foreach ($transaction->transaction_items as $detail)
  111.                         <tr>
  112.                             <td>{{ $loop->iteration }}</td>
  113.                             <td>{{ $detail->product->name }}</td>
  114.                             <td>Rp. {{ number_format($detail->product->price) }}</td>
  115.                             <td>
  116.                                 <img src="{{ $detail->product->product_galleries()->exists() ? url('storage/product/gallery', $detail->product->product_galleries->first()->image) : 'https://via.placeholder.com/100' }}"
  117.                                     width="250">
  118.                             </td>
  119.                             {{-- <td>Rp. {{ number_format($detail->subtotal) }}</td> --}}
  120.                         </tr>
  121.                     @endforeach
  122.                 </tbody>
  123.             </table>
  124.             <!-- End Table with stripped rows -->
  125.         </div>
  126.     </div>
  127.  
  128. @endsection
  129.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement