<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Models\BookingFoto;
use App\Models\TransaksiBuket;
use Illuminate\Http\Request;

class HistoriPesananController extends Controller
{
    public function index()
    {
        $riwayatBuket = TransaksiBuket::whereIn('status_transaksi', ['selesai', 'ditolak'])
            ->latest()->get();

        $riwayatFoto = BookingFoto::whereIn('status_booking', ['selesai', 'ditolak'])
            ->latest()->get();

        return view('admin.pesanan.riwayat', compact('riwayatBuket', 'riwayatFoto'));
    }
}
