mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-01-28 07:43:18 +00:00
⚡ Enhance Nostr fetcher: Refactor profile data merging logic for improved efficiency and accuracy.
🛠
24 lines
610 B
PHP
24 lines
610 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Api;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Models\EinundzwanzigPleb;
|
|
use Illuminate\Http\Request;
|
|
|
|
class GetPaidMembers extends Controller
|
|
{
|
|
public function __invoke($year, Request $request)
|
|
{
|
|
$paidMembers = EinundzwanzigPleb::query()
|
|
->whereHas('paymentEvents', function ($query) use ($year) {
|
|
$query->where('year', $year)
|
|
->where('paid', true);
|
|
})
|
|
->select('id', 'npub', 'pubkey', 'nip05_handle')
|
|
->get();
|
|
|
|
return response()->json($paidMembers);
|
|
}
|
|
}
|