Download the PHP package artistan/zero-nullable-dates without Composer

On this page you can find all versions of the php package artistan/zero-nullable-dates. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package zero-nullable-dates

ZNDCarbon

Laravel Models with nullable carbon dates, this also allow for returning a date object. When the value is null/zeros that will format to ''.

example

This is useful for old databases that do not have NO_ZERO_IN_DATE, NO_ZERO_DATE so they may have 0000-00-00 type dates.

Add ZNDTrait and a couple arrays to define nullable dates to allow for zero and nullable dates.

You may also set null_all_dates on your model to set all to nullable without the arrays

Ultimately you can just set them all to $nullable, the addition of $zero_datetime and $zero_date are for testing that the database is updating as expected.

The unit tests are dynamic and test 288 assertions

test for all combinations of what things are set for date columns.... all combinations of mutators, castings, and dates

mutator cast date
x
x
x
x x
x x
x x
x x x

notes on current laravel functionality dealing with toArray, attribute accessors, and dates

toArray vs accessor

if you use $model->{camel_key} (getAttributeValue), then it will

note: the appends variables ARE mutated attributes that do not exist in the model attributes...

if you get attributes via $model->toArray then it will

date mutators.

these are both mutators and accessors, or mutates in and out

data analysis

when date keys are set for dates that allow ZERO dates the formatting for 000-00-00 or variations of that fail. -0001-11-30 00:00:00 is the default result...

ZNDCarbon

using NULL as the data point when it is a zero nullable date

mysql mode

mysql

homestead box setup for testing

vim /etc/mysql/mysql.conf.d/mysqld.cnf

notes on dev package setup


All versions of zero-nullable-dates with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package artistan/zero-nullable-dates contains the following files

Loading the files please wait ....