Download the PHP package goldnead/statamic-events without Composer

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

Statamic Events

Events with as many dates as they actually have, in the timezone they actually happen in, with an ICS download per date and a calendar feed people can subscribe to.

A Statamic 6 addon. Brand-scoped through goldnead/statamic-brand-context, which is its only hard dependency — a concert calendar on an artist's website installs without a CRM.


Why not a collection with a date field

Because an event and its dates are not the same thing. One entry per date duplicates the description as many times as there are dates, and leaves nowhere to record that the third date is cancelled while the others still stand. So the description lives on the event and the dates live on its occurrences, and a cancellation is a property of one date rather than the removal of an entry.


Requirements

PHP 8.2+
Laravel 12.40+ or 13
Statamic 6.0+
Database MySQL, MariaDB, PostgreSQL or SQLite

Installation

The Control Panel bundle is committed, so there is nothing to build. Publish it if your deployment serves public/vendor from disk:

Optional:

Permissions

Permission Grants
view events The Events screens, read-only
manage events Creating, editing, cancelling and deleting events and their dates
manage events settings The settings section described below

All three are registered in the events group. manage events is a child of view events; manage events settings stands on its own, because changing how new events start and what the public feed serves is a different question from tending the calendar.

Settings

Most of config/events.php is editable per brand under Control Panel → Addon-Einstellungen, without a deploy: the timezone and visibility a new event starts with, the five calendar feed keys and the listing page size. Only what somebody changed is stored; everything else keeps following the config file, so upgrading the package still moves the defaults.

Three keys stay in the config file on purpose. cp.enabled and bridges.activity are read while the application boots — a switch on a screen that only takes effect on the next deploy would be a lie — and types is a handle-to-label map, which no settings field can edit without mangling it.

The screen itself comes from goldnead/statamic-brand-context; this package only declares its fields.


Usage

Create an event in the Control Panel under Content → Events, give it as many dates as it has, and put one of the tags below on a page. Nothing else is required — no collection, no blueprint to author, no route to register.

From PHP, the same data comes through the Events facade; from another addon, through the five domain events. Both are documented below.


The model

Event — title, slug, description, type, visibility, status, timezone.

Occurrence — one date of an event: start, optional end, optional all-day flag, an optional timezone override, a venue and/or an online URL, an optional presale start, and a status.

Two rules the addon enforces rather than suggests:

Status and visibility are separate

status answers "is this finished?" — draft or published. visibility answers "who is it for?":

Visibility In the calendar feed Reachable by link In the Control Panel
public yes yes yes
unlisted no yes yes
private no no yes

A draft is never publicly readable whatever its visibility.

Cancelling, not deleting

$occurrence->cancel('Storm damage') keeps the row, sets STATUS:CANCELLED and raises the RFC 5545 SEQUENCE. That is the only way a cancellation reaches somebody who already imported the date — deleting it leaves the concert in their calendar forever. Cancelling twice is a no-op.


Antlers tags

{{ events }}

Lists events. Published and non-private only.

Parameter Default
type — One or more types, comma separated
limit —
listable true false also includes unlisted events. Never private ones.

{{ events:occurrences }}

Lists dates, oldest first.

Parameter Default
event — An event slug
type —
from / to — Any parseable date
limit —
order asc asc or desc
include_cancelled true
listable true

Each date exposes starts_at and ends_at in the date's own timezone, starts_at_utc and ends_at_utc for arithmetic, timezone, all_day, cancelled, cancellation_reason, online, online_url, the venue_* fields, a one-line location, an ics_url, and the whole event.

{{ events:upcoming }}

The same, from now on, with cancelled dates dropped. from moves the horizon rather than being ignored.

{{ events:next }}

The next date somebody can attend, or nothing to loop over. Cancelled dates are never "next".

{{ events:count }}

The number of matching dates. Takes the same parameters as {{ events:occurrences }}.

{{ events:feed_url }} and {{ events:ics_url }}


Calendar output

URL
/!/events/calendar.ics The feed. ?type= narrows it.
/!/events/occurrences/{uuid}.ics One date.

Both are unauthenticated — a calendar subscription is a URL a phone fetches with no session — and both are built from the visibility rules above. type can only ever narrow; nothing in the query string can widen what a feed contains.

Three things worth knowing about the output:

Feeds are capped at events.feeds.max_occurrences (default 500) and reach events.feeds.past_days into the past (default 1), so a date that finished this morning does not vanish mid-day.


Domain events

Event Fired when
Goldnead\Events\Events\EventPublished An event moves from draft to published. Once per transition.
Goldnead\Events\Events\OccurrenceScheduled A date is added
Goldnead\Events\Events\OccurrenceRescheduled A date moves. Carries previousStartsAt and previousEndsAt.
Goldnead\Events\Events\OccurrenceCancelled A date is called off. Carries the reason.
Goldnead\Events\Events\OccurrencePresaleChanged A date's presale start is set, moved or cleared. Carries previousPresaleStartsAt.

This addon fires; it does not orchestrate. Workflow building belongs in statamic-automations, which can trigger on all five.

RSVP and programme

Off by default: set events.rsvp.enabled to true. One answer per account and event — going, interested or not_going.

Only signed-in accounts may answer, and only for a published event that is not private; anything else throws AuthorizationException. {{ events:rsvp event="<uuid>" }} gives enabled, can_respond, status (the visitor's own), going, interested and not_going.

The addon knows nothing about statamic-accounts, so there is no erasure contributor. When an account is deleted, call Rsvps::eraseFor($user) from yours.

Every event also has an optional program, a list of time and title, edited as a grid in the Control Panel and returned as $event->program.

Optional siblings

Bridged by class_exists, never as a Composer requirement:

The facade

Everything the tags and the calendar routes do goes through these, so the visibility rules exist in one place.


Not in v1

Capacity, waiting lists, reminders, access gating, attendance tracking, recurrence-rule generation, course and community linkage.

Deliberately: RSVP and waiting lists pull identity, notifications and entitlements into the first release, and reminders pull the scheduler. The core has to carry on its own first. v1.1 takes RSVP, capacity and waiting lists; v1.2 takes reminders through statamic-notifications.

Development

The MySQL leg is not optional in CI. SQLite has no InnoDB key-length limit, no utf8mb4 byte arithmetic, no fixed column widths and no enforced foreign keys unless asked — and this addon's cascade from events to event_occurrences is one.

License

Commercial license. See LICENSE.md.


All versions of statamic-events with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
goldnead/statamic-brand-context Version ^1.27
laravel/framework Version ^12.40|^13.0
statamic/cms Version ^6.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 goldnead/statamic-events contains the following files

Loading the files please wait ...