Download the PHP package tomshaw/laravel-calendar-table without Composer

On this page you can find all versions of the php package tomshaw/laravel-calendar-table. 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 laravel-calendar-table

Laravel Calendar Table 📈 📊

GitHub Workflow Status issues forks stars GitHub license

A calendar table, also known as a date dimension table, is a table in a database that is designed to help with date-related queries and reporting. It contains a row for each date within a certain range, often many years into the past and future. Each row contains various fields about the date, such as the day, month, year, quarter, day of the week, is it a weekend or a weekday, is it a holiday, etc.

The usefulness of a calendar table in database reporting comes from its ability to simplify and optimize date-related queries. Here are some of its benefits:

  1. Simplifying Queries: Without a calendar table, extracting components of a date usually involves complex functions and calculations. With a calendar table, you can simply join your data with the calendar table to get these components.

  2. Improving Performance: Date calculations can be CPU-intensive and slow down your queries. By moving these calculations into a calendar table, you can improve query performance.

  3. Consistency: A calendar table ensures that date information is handled consistently across all queries and reports.

  4. Flexibility: You can add custom fields to your calendar table to suit your business needs. For example, you could add fields for your company's fiscal periods or specific business events.

  5. Handling Missing Dates: If your data has missing dates, those gaps can cause problems in reporting. A calendar table can help ensure continuity in your reports.

In summary, a calendar table is an extremely useful tool for anyone who frequently works with dates in their database.

Installation

Require the package with composer using the following command:

Publish the configuration if you wish to change the command defaults.

Database Migration

Run the database migration to create the calendar table.

Console Command

The calendar table command accepts two optional parameters. If no start year is specified you will be prompted to enter one. If no end year is specified the current year will be used.

Note: If the table has been pre-filled you will be given the option to truncate.

Sure, here's a README.md section that explains the configuration options for your Laravel Calendar Table package:

Configuration

The Laravel Calendar Table package provides several configuration options that you can adjust to suit your needs. You can find these options in the config.php file.

Table Name

The table_name option allows you to define a custom table name for the database records. By default, it is set to 'date_dimension'.

Seasons

The seasons array allows you to define the start month for each season. By default it is configured for the meteorological seasons of the Northern Hemisphere:

If you are in the Southern Hemisphere, you should reconfigure the seasons to start approximately six months later:

Fiscal Year Start Month

The fiscal_year_start_month option allows you to define the start month of the fiscal year. The value should be an integer between 1 (January) and 12 (December). By default, it is set to 10, meaning the fiscal year starts in October.

Date Range

The date_range array allows you to define the valid start and end year range for populating the calendar table.

Requirements

The package is compatible with Laravel 10 or later.

Support

If you have any issues or questions please send a pull request.

License

The MIT License (MIT). Please see License for more information.


All versions of laravel-calendar-table with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1|^8.2
geoffreyrose/us-holidays Version ^2.5
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 tomshaw/laravel-calendar-table contains the following files

Loading the files please wait ....