Download the PHP package konnco/filament-timematrix without Composer

On this page you can find all versions of the php package konnco/filament-timematrix. 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 filament-timematrix

Filament Time Matrix

An interactive Filament form component for selecting time slots across days with powerful validation and manipulation features.

Features

Requirements


Installation

Quick Start

Simple Usage

This will create a time matrix with:

Complete Usage

Available Methods

Method Description Example
hours(int $startTime, int $endTime) Set custom hour range (0-23) ->hours(8, 18)
businessHours(int $startTime, int $endTime) Shortcut for business hours ->businessHours(9, 17)
days(array $days) Set specific days (Day enum or Carbon constants) ->days([Day::MONDAY, Day::FRIDAY])
weekdays() Monday to Friday only ->weekdays()
weekend() Saturday and Sunday only ->weekend()
locale(?string $locale, string $format) Set locale and format (long/short/min) ->locale('id', 'short')
showSelectAllHours(bool $show) Show/hide select all hours button ->showSelectAllHours(false)
showSelectAllDays(bool $show) Show/hide select all days button ->showSelectAllDays(false)

Infolist Display

Use the dedicated infolist entry to render a saved schedule as a read-only matrix (active slots are highlighted, no interactive checkboxes).

It shares the same configuration methods as the form component:

Method Description Example
hours(int $startTime, int $endTime) Set custom hour range (0-23) ->hours(8, 18)
businessHours(int $startTime, int $endTime) Shortcut for business hours ->businessHours(9, 17)
days(array $days) Set specific days (Day enum) ->days([Day::MONDAY, Day::FRIDAY])
weekdays() Monday to Friday only ->weekdays()
weekend() Saturday and Sunday only ->weekend()
locale(?string $locale, string $format) Set locale and format (long/short) ->locale('id', 'short')

Tip: Configure the infolist entry with the same hours()/days() as the form so the displayed grid matches what was selected.


Facade Methods Reference

isActiveAt(array $data, ?Carbon $dateTime = null): bool

Check if time slot is active at a specific time or now (default).

Parameters:

Returns: bool

Examples:


hasActiveDay(array $data, string|Day|null $day = null): bool

Check if there are active slots on a specific day or today (default).

Parameters:

Returns: bool

Examples:


getActiveHours(array $data, string|Day|null $day = null): array

Get active hours for a specific day or today (default).

Parameters:

Returns: array - Array of hours like [8, 9, 10, 14, 15]

Examples:


Validation Methods

validate(array $data): bool

Validate the structure of time matrix data.

Example:


hasSelection(array $data): bool

Check if there is at least one selected slot.

Example:


Statistics Methods

isFullyActive(array $data): bool

Check if schedule is 24/7 (all days, all hours).

Example:


getTotalActiveHours(array $data): int

Get total active hours per week.

Example:


getActivePercentage(array $data): float

Get percentage of active hours (0-100).

Example:


getActiveDays(array $data): array

Get days that have at least one active hour.

Returns: Array of Day enums

Example:


isDayHourActive(array $data, string|Day $day, int $hour): bool

Check if a specific day and hour combination is active.

Example:


Time Query Methods

getNextAvailableSlot(array $data, Carbon $from): ?Carbon

Get next available slot from a specific time.

Example:


getSlotsInRange(array $data, Carbon $start, Carbon $end): array

Get all slots within a date range.

Example:


toCarbonSlots(array $data, ?Carbon $referenceWeek = null): array

Convert to Carbon instances for a specific week.

Example:


Formatting Methods

toReadableFormat(array $data): array

Convert to simplified format.

Returns: ['monday' => [8, 9, 10], 'tuesday' => [14, 15]]

Example:


formatDaySchedule(array $data, string|Day $day): string

Format single day to human-readable string.

Returns: String like "08:00-10:59, 14:00-16:59"

Example:


formatAllDays(array $data, ?string $locale = null): array

Format all days with localized labels.

Example:


Real-World Usage Examples

1. Check Merchant Status


2. Display in Infolist


API Methods Summary

Smart Default Methods (NEW!)

Method Default Behavior Usage
isActiveAt($data, ?$dateTime) Checks now if no param isActiveAt($data)
hasActiveDay($data, ?$day) Checks today if no param hasActiveDay($data)
getActiveHours($data, ?$day) Gets today's hours if no param getActiveHours($data)

All Available Methods

Method Return Type Description
validate($data) bool Validate structure
hasSelection($data) bool Check if has selections
isActiveAt($data, ?$dateTime) bool Check active at time (default: now)
hasActiveDay($data, ?$day) bool Check day has active slots (default: today)
getActiveHours($data, ?$day) array Get active hours (default: today)
isFullyActive($data) bool Check if 24/7
getTotalActiveHours($data) int Total hours per week
getActivePercentage($data) float Coverage percentage
getActiveDays($data) array<Day> Days with active slots
isDayHourActive($data, $day, $hour) bool Check specific day+hour
getNextAvailableSlot($data, $from) ?Carbon Next available slot
getSlotsInRange($data, $start, $end) array<Carbon> Slots in range
toCarbonSlots($data, ?$week) array<Carbon> Convert to Carbon
formatDaySchedule($data, $day) string Format single day
formatAllDays($data, ?$locale) array Format all days
toReadableFormat($data) array Simplified format

License

MIT License. See LICENSE for details.

Credits

Support

For issues and feature requests, please use the GitHub issue tracker.


All versions of filament-timematrix with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1|^8.2|^8.3|^8.4
filament/filament Version ^3.0|^4.0|^5.0
illuminate/contracts Version ^10.0|^11.0|^12.0|^13.0
nesbot/carbon Version ^2.0|^3.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 konnco/filament-timematrix contains the following files

Loading the files please wait ...