You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `wherePast` and `whereFuture` methods may be used to determine if a column's value is in the past or future:
781
+
782
+
$invoices = DB::table('invoices')
783
+
->wherePast('due_at')
784
+
->get();
785
+
786
+
$invoices = DB::table('invoices')
787
+
->whereFuture('due_at')
788
+
->get();
789
+
790
+
The `whereNowOrPast` and `whereNowOrFuture` methods may be used to determine if a column's value is in the past or future, inclusive of the current date and time:
791
+
792
+
$invoices = DB::table('invoices')
793
+
->whereNowOrPast('due_at')
794
+
->get();
795
+
796
+
$invoices = DB::table('invoices')
797
+
->whereNowOrFuture('due_at')
798
+
->get();
799
+
800
+
The `whereToday`, `whereBeforeToday`, and `whereAfterToday` methods may be used to determine if a column's value is today, before today, or after today, respectively:
801
+
802
+
$invoices = DB::table('invoices')
803
+
->whereToday('due_at')
804
+
->get();
805
+
806
+
$invoices = DB::table('invoices')
807
+
->whereBeforeToday('due_at')
808
+
->get();
809
+
810
+
$invoices = DB::table('invoices')
811
+
->whereAfterToday('due_at')
812
+
->get();
813
+
814
+
Similarly, the `whereTodayOrBefore` and `whereTodayOrAfter` methods may be used to determine if a column's value is before today or after today, inclusive of today's date:
815
+
816
+
$invoices = DB::table('invoices')
817
+
->whereTodayOrBefore('due_at')
818
+
->get();
819
+
820
+
$invoices = DB::table('invoices')
821
+
->whereTodayOrAfter('due_at')
822
+
->get();
823
+
778
824
**whereColumn / orWhereColumn**
779
825
780
826
The `whereColumn` method may be used to verify that two columns are equal:
0 commit comments