<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Models\Transaction;

class TransactionController extends Controller
{
    public function index()
    {
        $transactions = Transaction::with('user')
            ->orderByDesc('created_at')
            ->paginate(20);

        return view('admin.transactions', compact('transactions'));
    }
}
