PHPackages                             hedii/laravel-date-range - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hedii/laravel-date-range

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

hedii/laravel-date-range
========================

A date range trait with local scope methods for Laravel Eloquent models

4.0.0(4y ago)2140.6k10MITPHPPHP ^8.0CI failing

Since Sep 5Pushed 4y ago2 watchersCompare

[ Source](https://github.com/hedii/laravel-date-range)[ Packagist](https://packagist.org/packages/hedii/laravel-date-range)[ RSS](/packages/hedii-laravel-date-range/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (9)Dependencies (4)Versions (10)Used By (0)

[![Build Status](https://github.com/hedii/laravel-date-range/workflows/Tests/badge.svg)](https://github.com/hedii/laravel-date-range/actions)[![Total Downloads](https://camo.githubusercontent.com/30feda29336cb88454d79b27d7bfcf00cab752d660a9133232157402232f96e3/68747470733a2f2f706f7365722e707567782e6f72672f68656469692f6c61726176656c2d646174652d72616e67652f646f776e6c6f616473)](//packagist.org/packages/hedii/laravel-date-range)[![License](https://camo.githubusercontent.com/51d2935654b952d5567899eb46e924d9a4db42257c7fa1871a4f6fe85a13dce7/68747470733a2f2f706f7365722e707567782e6f72672f68656469692f6c61726176656c2d646174652d72616e67652f6c6963656e7365)](//packagist.org/packages/hedii/laravel-date-range)[![Latest Stable Version](https://camo.githubusercontent.com/476fd05fdc354f6addbd1133666dc4cc0c574f60f8a8ee692c63c0d5f87f3a1a/68747470733a2f2f706f7365722e707567782e6f72672f68656469692f6c61726176656c2d646174652d72616e67652f76)](//packagist.org/packages/hedii/laravel-date-range)

Laravel Date Range
==================

[](#laravel-date-range)

A date range trait with local scope methods for Laravel Eloquent models

Table of contents
-----------------

[](#table-of-contents)

- [Table of contents](#table-of-contents)
- [Installation](#installation)
- [Usage](#usage)
    - [Updating your Eloquent Models](#updating-your-eloquent-models)
    - [Available methods](#available-methods)
    - [Example](#example)
- [Testing](#testing)
- [License](#license)

Installation
------------

[](#installation)

Install via [composer](https://getcomposer.org/doc/00-intro.md)

```
composer require hedii/laravel-date-range
```

Usage
-----

[](#usage)

### Updating your Eloquent Models

[](#updating-your-eloquent-models)

Simply tell your eloquent model that it has to use the DateRange trait:

```
