Download the PHP package wdelfuego/nova-datetime without Composer

On this page you can find all versions of the php package wdelfuego/nova-datetime. 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 nova-datetime

This package adds a DateTime field with support for a global DateTime format, syntactic sugar for formatting individual DateTime fields and powerful date filters for Index views. It can serve as a base for more extensions and improvements with regard to DateTime fields and logic in Laravel's Nova 4.

Installation

Usage

Formatting DateTime fields globally

  1. First, publish this package's config file by running:

  2. Then, set the format you want to use for all of your DateTime fields in config/nova-datetime.php, for example:

  3. In your Nova resource, replace all instances of Laravel\Nova\Fields\DateTime with instances of Wdelfuego\Nova\DateTime\Fields\DateTime by adding this use statement:

This allows you to apply the global format to all DateTime fields in your own Nova resources automatically.

To automatically apply the global DateTime format to the 'Action Happened at' column of the action events in your resources' action logs as well, install the wdelfuego/nova-actions package.

Formatting individual DateTime fields

The examples below assume that the Eloquent model used for the Nova resource has an attribute named 'attribute'.

The withDateFormat helper is added automatically to all DateTime fields in your project (including Nova's own, so you don't have to use a custom DateTime field) and allows you to directly set the format you want the field to be displayed in:

It is simple syntactic sugar around the displayUsing method that works on DateTime fields since Nova 4.2.4.

Filtering resources by DateTime fields

You can use Laravel's native filterable method on your DateTime fields for a standard date range filter or use any combination of the date filters below to give your end users powerful ways to filter their Nova resources from the Index view.

You can add a combination of these filters to the Nova resource to allow end users to define a date range.

For example, you could make a standard date range filter that allows users to exclude a specific date like this:

You can also filter for specific dates only using just a single OnDate filter, or force open-ended range filtering by adding just one of the After or Before filters.

Support

For any problems, questions or remarks you might have, please open an issue on GitHub.


All versions of nova-datetime with dependencies

PHP Build Version
Package Version
Requires laravel/nova Version ^4.2.4
php Version ^7.4|^8.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 wdelfuego/nova-datetime contains the following files

Loading the files please wait ....