<?php

namespace App\Http\Controllers;

use App\Models\Transaction;
use Illuminate\Http\Request;

class OrderController extends Controller
{
    public function index(Request $request)
    {

        $orders = Transaction::where('user_id', auth()->user()->id)
        ->orderBy('id','desc')
        ->paginate();

        return view('account.orders', compact('orders'));
    }
    
}
