Files
ladill-mini/app/Http/Controllers/Mini/PaymentsController.php
T
isaaccladandCursor db66d99895 Initial Ladill Mini app — trader payment QRs without styling.
Lean control center at mini.ladill.com: payment QR CRUD, Paystack checkout with 5% fee settlement via Billing API, payments feed, and payouts. QR codes use a fixed black-and-white preset only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-07 18:43:39 +00:00

32 lines
718 B
PHP

<?php
namespace App\Http\Controllers\Mini;
use App\Http\Controllers\Controller;
use App\Models\MiniPayment;
use App\Models\QrCode;
use Illuminate\Http\Request;
use Illuminate\View\View;
class PaymentsController extends Controller
{
public function index(Request $request): View
{
$account = ladill_account();
$qrIds = $account->qrCodes()
->where('type', QrCode::TYPE_PAYMENT)
->pluck('id');
$payments = MiniPayment::query()
->whereIn('qr_code_id', $qrIds)
->with('qrCode')
->latest('created_at')
->paginate(25);
return view('mini.payments', [
'payments' => $payments,
]);
}
}