Download the PHP package vicenterusso/laravel-magic-date-mutator without Composer
On this page you can find all versions of the php package vicenterusso/laravel-magic-date-mutator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vicenterusso/laravel-magic-date-mutator
More information about vicenterusso/laravel-magic-date-mutator
Files in vicenterusso/laravel-magic-date-mutator
Package laravel-magic-date-mutator
Short Description Try to auto convert date formats before mutate
License MIT
Homepage https://github.com/vicenterusso/laravel-magic-date-mutator
Informations about the package laravel-magic-date-mutator
Laravel Magic Date Mutator
This package tries to auto convert date formats before mutator happens (if any). There is no need to specify what field is a date, it detects automatically from table.
Installation
You can install the package via composer:
You can publish the config file with:
This is the contents of the published config file:
Usage
Insert the following trait to any model, and you can retrieve all info about the table fields
And that's it! When you set a value to a date type field, it tries to convert to a know format before any validation or cast happens
Credits
- Vicente Russo
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-magic-date-mutator with dependencies
illuminate/contracts Version ^8.0
nesbot/carbon Version ^2.46
spatie/laravel-package-tools Version ^1.4.3