Skip to content

Commit bf1b183

Browse files
committed
Merge branch 'main' of github.com:laracraft-tech/laravel-date-scopes
2 parents 7eb4ba6 + 703448c commit bf1b183

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to `laravel-date-scopes` will be documented in this file.
44

5+
## v2.0.0 - 2023-10-12
6+
7+
### What's Changed
8+
9+
- you can now pass `startFrom` as a parameter to query between certain ranges. For instance: `Transaction::ofLastYear(startFrom: '2020-01-01')`. You may need to change the order of your arguments or use named arguments. Checkout [UPGRADING](https://github.com/laracraft-tech/laravel-date-scopes/blob/main/UPGRADING.md) file for that.
10+
511
## v1.1.1 - 2023-05-02
612

713
### What's Changed

README.md

+13-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,15 @@ class Transaction extends Model
1818
use DateScopes;
1919
}
2020

21-
Transaction::ofToday(); // query transactions created today
22-
Transaction::ofLastWeek(); // query transactions created during the last week
23-
Transaction::monthToDate(); // query transactions created during the start of the current month till now
24-
Transaction::ofLastYear(startFrom: '2020-01-01') // query transactions created during the last year, starting from 2020
21+
// query transactions created today
22+
Transaction::ofToday();
23+
// query transactions created during the last week
24+
Transaction::ofLastWeek();
25+
// query transactions created during the start of the current month till now
26+
Transaction::monthToDate();
27+
// query transactions created during the last year, start from 2020
28+
Transaction::ofLastYear(startFrom: '2020-01-01');
29+
2530
// ... and much more scopes are available (see below)
2631

2732
// For sure, you can chain any Builder function you want here.
@@ -34,6 +39,10 @@ Transaction::ofLastWeek()->avg('amount');
3439

3540
- [`Installation`](#installation)
3641
- [`Configuration`](#configuration)
42+
- [`Global configuration`](#global-configuration)
43+
- [`Fluent date range configuration`](#fluent-date-range-configuration)
44+
- [`Fluent created_at column configuration`](#fluent-date-range-configuration)
45+
- [`Custom start date`](#custom-start-date)
3746
- [`Scopes`](#scopes)
3847

3948
## Installation

0 commit comments

Comments
 (0)