Download the PHP package brickx/calendax without Composer

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

Livewire calendar for Laravel

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

NOTE: This package is intended for my own use only, so a few things are very specific to my projects (e.g. importing .tsx & .scss uncompiled files directly).

If anyone is interested in making it easier to set up and more maintainable for a wider audience, please submit a PR or open a discussion!

Also, feel free to consider using the package on which this one is based as stated below.

Calendax allows you to build a Livewire calendar, filled with events of any kind. Events can be created from any model or dataset.

It is heavily inspired by Andrés Santibáñez's Livewire Calendar.

Preview

preview

Table of contents

Installation

You can install the package via composer:

You can publish the config file with:

This is the contents of the published config file:

Optionally, you can publish the views using

Requirements

This package uses livewire/livewire (https://laravel-livewire.com) under the hood.

It also uses TailwindCSS (https://tailwindcss.com) for styling. Please make sure you include both of these dependencies before using this component.

Usage

Initialization

First, create a new Livewire component that extends Calendax.

You can use make:livewire to create this component. For example:

Then, in the created MyCalendar class, extend Calendax instead of extending from the base Component Livewire class:

In this class, you must override the following method in order to implement custom logic for loading events:

Also remove the render method, as it will be handled for you.

In the events() method, you should return a collection containing the events that should be displayed on the calendar.

Loading events (using arrays)

Events must be keyed arrays holding at least the following keys: id, title, description, date (which must be a Carbon\Carbon instance).

The date value will be used to determine to which day the event will be displayed.

Loading events (using Eloquent query)

You can also load values dynamically in the events() method. You can use the following component properties to filter your events:

Rendering the calendar

Now you can include your calendar in any view using Blade components:

This will render a calendar grid.

example

Choosing the starting month

By default, the component will render the current month. If you want to change the starting month, you can set the year and month props.

Enabling drag & drop

To enable drag & drop, include @calendaxScripts after your @livewireScripts directive.

Handling navigation

The component has 4 public methods used to navigate between months:

For example, these methods can be used to build a navigation system using additional views. Check out below section for example usage.

Advanced usage

Blade customization

When rendering your Blade component, several additional attributes are available to customize the behavior of your calendar:

Custom views

You can also use custom Blade views to render different parts of the calendar.

It is recommended to publish the base Blade views used by the component and extend their behavior and styling to your liking. To do this, please check out the Installation section.

Those views can be specified using the following attributes:

All custom views paths must be relative to the resources/views directory.

Interactivity

Several methods are available to interact with the calendar:

You can override any of them to implement your custom logic.

By default, click and drag & drop events are enabled. To disable them you can use the following attributes when rendering the component

Automatic polling

You can add automatic polling if need be by defining a $pollMillis property in the Livewire component.

You can also combine it with $pollAction in order to call a specific action in your component at the desired polling interval.

To learn more about polling, please check out https://laravel-livewire.com/docs/2.x/polling.

Flatpickr

To handle navigation between months, this package makes use of the Flatpickr library. It displays a calendar picker which is way more powerful than simple <select>.

Importing

First, add the Flatpickr library to your package.json's dependencies:

Then import this package's flatpickr.scss and flatpickr.tsx files to you main stylesheet & script.

app.scss:

app.js:

Customization

You can customize the colors of the calendar picker to match your theme. To do so, simply override the Sass variables when importing flatpickr.scss:

Testing

You can test the component using Pest by running the following commands, depending on your needs.

Standard test:

With coverage:

Parallel test:

Parallel test with coverage:

Todo

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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


All versions of calendax with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^9.23
livewire/livewire Version ^2.10
spatie/laravel-package-tools Version ^1.9.2
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 brickx/calendax contains the following files

Loading the files please wait ....