Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

vipin93's avatar
Level 13

How to find previous due mont fee?

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

0 likes
1 reply

Please or to participate in this conversation.