<?php

namespace App\Http\Controllers;

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

class TransactionController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        $transactions = Transaction::with('merchant')->latest()->paginate(30);

        $data = [
            'transactions'=>$transactions,

        ];
        return \view('transactions.index',$data);

    }
}
