Relative Date Helpers in Laravel 11.42

Explanation:
The Laravel team released v11.42, which includes relative date helpers, fluent numeric validation, JSON assertions on streamed content, and more.
#Relative Date Shorthands
Jason McCreary contributed relative date shorthand methods to the query builder that you can use to constrain date fields for things like finding records in the past, future, today, after today, and more:
Code:
DB::table('invoices') ->wherePast('due_at') ->get(); DB::table('invoices') ->whereFuture('due_at') ->get(); DB::table('invoices') ->whereNowOrPast('due_at') ->get(); DB::table('invoices') ->whereNowOrFuture('due_at') ->get(); DB::table('invoices') ->whereToday('due_at') ->get(); DB::table('invoices') ->whereBeforeToday('due_at') ->get(); DB::table('invoices') ->whereAfterToday('due_at') ->get();
Comments :