Package Data | |
---|---|
Maintainer Username: | cino |
Package Create Date: | 2020-04-01 |
Package Last Update: | 2020-04-14 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-23 03:20:56 |
Package Statistics | |
---|---|
Total Downloads: | 12 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 9 |
Total Watchers: | 3 |
Total Forks: | 0 |
Total Open Issues: | 0 |
This package is for enabling the usage of Chronos in Laravel, this will not cover all cases but at least gives you Chronos instances in favor of Carbon, most of the time. (You'll see that in the Laravel source there are enough cases where it calls Carbon directly.)
The preferred method of installation is via Composer. Run the following
command to install the package and add it as a requirement to your project's
composer.json
:
composer require cino/laravel-chronos
The only thing you need to do is change your models to extend the Model class from this package. When you do this all functions that interact with dates are overridden to return a Chronos object.
use Cino\LaravelChronos\Eloquent\Model;
class MyModel extends Model
{
}
This open-source software is licenced under the MIT license.