add more controller

This commit is contained in:
root
2026-03-10 00:48:32 -04:00
parent 5eeaec0257
commit 20ee70d153
151 changed files with 9481 additions and 8407 deletions
@@ -0,0 +1,19 @@
<?php
namespace App\Services\Parents;
use App\Models\Invoice;
class ParentInvoiceService
{
public function listInvoices(int $parentId, ?string $schoolYear = null): array
{
$rows = Invoice::query()
->where('parent_id', $parentId)
->when($schoolYear, fn ($q) => $q->where('school_year', $schoolYear))
->orderByDesc('created_at')
->get();
return $rows->toArray();
}
}