PHPackages                             jlorente/laravel-eloquent-splitted-dates-trait - 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. jlorente/laravel-eloquent-splitted-dates-trait

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

jlorente/laravel-eloquent-splitted-dates-trait
==============================================

A Laravel Trait for Eloquent Models to handle date fields that are stored both in the date field itself and in separate field components such as year, month, day, time, etc...

1.0.5(5y ago)15.8k↓40%BSD-3-ClausePHPPHP &gt;=7.0.0CI failing

Since Oct 2Pushed 5y ago1 watchersCompare

[ Source](https://github.com/jlorente/laravel-eloquent-splitted-dates-trait)[ Packagist](https://packagist.org/packages/jlorente/laravel-eloquent-splitted-dates-trait)[ RSS](/packages/jlorente-laravel-eloquent-splitted-dates-trait/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (2)Versions (6)Used By (0)

Laravel Eloquent Model Splitted Dates Trait
===========================================

[](#laravel-eloquent-model-splitted-dates-trait)

A Laravel Trait for Eloquent Models to handle date fields that are stored both in the date field itself and in separate field components such as year, month, day, hour, etc...

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

With Composer installed, you can then install the extension using the following commands:

```
$ php composer.phar require jlorente/laravel-eloquent-splitted-dates-trait
```

or add

```
...
    "require": {
        "jlorente/laravel-eloquent-splitted-dates-trait": "*"
    }
```

to the `require` section of your `composer.json` file.

Usage
-----

[](#usage)

### Basic Configuration

[](#basic-configuration)

To enable and configure splitted dates fields in an Eloquent Model use the Jlorente\\Laravel\\Eloquent\\Concerns\\SplittedDates\\HasSplittedDates Trait on the model and define the splittedDates array with the date fields you want to store splitted.

```
