Skip to content

feat: use scopes with other columns besides created_at #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,15 @@ If you want data not starting from now, but from another date, you can do this w
Transaction::ofLastYear(startFrom: '2020-01-01')
```

### Custom datetime column

If you want to use column other than `created_at` column, you can pass the column name as parameter to the scope:


```php
Transaction::ofToday(column: 'approved_at')
```

## Scopes

- [`seconds`](#seconds)
Expand Down
Loading