<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Models\PaymentTransaction;
use Illuminate\Http\Request;

class PaymentTransactionController extends Controller
{
    public function index()
    {
        $transactions = PaymentTransaction::with(['order', 'gateway'])->latest()->paginate(10);
        return view('admin.payment-transactions.index', compact('transactions'));
    }

    public function show(PaymentTransaction $paymentTransaction)
    {
        $paymentTransaction->load(['order', 'gateway']);
        return view('admin.payment-transactions.show', compact('paymentTransaction'));
    }
}
