Level 13
this questioned
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm try to retrieve student all due fee ( month<=current) I don't understand how to do , I;m able to do only current month but no previous all month--
$dt = Carbon::now();
$query = Student::where('status',1)->whereDoesntHave('subscriptions', function ($queryt) use($dt) {
$queryt->whereMonth('created_at','=',$dt->month);
})->with('courses')->paginate(15);
This query for all student who not submitted this month. How can show who not paid fee in previous month fee in student account.
Thanks
Please or to participate in this conversation.