Skip to content

Commit 4fe4fc8

Browse files
authored
Merge pull request #25 from aymanalhattami/main
feat: use scopes with other columns besides created_at
2 parents 42dc649 + b39a6f3 commit 4fe4fc8

File tree

3 files changed

+219
-140
lines changed

3 files changed

+219
-140
lines changed

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,15 @@ If you want data not starting from now, but from another date, you can do this w
152152
Transaction::ofLastYear(startFrom: '2020-01-01')
153153
```
154154

155+
### Custom datetime column
156+
157+
If you want to use column other than `created_at` column, you can pass the column name as parameter to the scope:
158+
159+
160+
```php
161+
Transaction::ofToday(column: 'approved_at')
162+
```
163+
155164
## Scopes
156165

157166
- [`seconds`](#seconds)

0 commit comments

Comments
 (0)