Events are the central resource in Eventify. Each event record holds scheduling information (start and end dates), logistics details (capacity, attendee count, price, and location), and classification metadata (category and status). The five endpoints below give you complete control over event data: listing all events with their related records eager-loaded, fetching a single event by ID, creating a new event, updating an existing one, or deleting it permanently.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/astrxnomo/eventify-app/llms.txt
Use this file to discover all available pages before exploring further.
The event object
Every successful response involving a single event — or each element in an array response — returns an event object with the following fields.Auto-incremented primary key uniquely identifying the event.
Foreign key referencing the
users table. Identifies the user who owns or created the event. null if no user is assigned (set to null on user deletion).Foreign key referencing the
statuses table. Defaults to 1 (Disponible) on creation. Set to null on status deletion.Foreign key referencing the
locations table. Set to null on location deletion.Foreign key referencing the
categories table. Set to null on category deletion.Display name of the event. Maximum 255 characters.
Full text description of the event.
URL pointing to the event’s cover image. Stored as a non-nullable string in the database; pass an empty string if no image URL is available.
Total number of attendee spots available for the event.
Current number of confirmed attendees. Defaults to
0 at creation and is incremented by the system as tickets are issued.Ticket price for the event (stored as an integer, representing the smallest currency unit or whole currency amount depending on your locale).
ISO 8601 datetime string indicating when the event begins.
ISO 8601 datetime string indicating when the event ends. Always on or after
start_date.ISO 8601 datetime string set automatically when the record is first created.
ISO 8601 datetime string updated automatically whenever the record is modified.
Eager-loaded category object (
id, name, created_at, updated_at). Present on index and show responses.Eager-loaded location object (
id, address, city, region, country, latitude, longitude, created_at, updated_at). Present on index and show responses.Eager-loaded user object. Present on
index and show responses.Eager-loaded status object (
id, name, created_at, updated_at). Present on index and show responses.GET /api/event
Returns an array of all events in the database. Each event object includes the fully eager-loadedcategory, location, user, and status relations so that you do not need to make additional requests to resolve associated records.
[] with status 200 when no events exist.
GET /api/event/{id}
Returns a single event identified by its integerid, with all relations eager-loaded.
Path parameter
The unique identifier of the event to retrieve.
| Status | Body |
|---|---|
404 Not Found | {"message": "Event not found"} |
POST /api/event
Creates a new event record. The request body must be JSON or form-encoded and pass all required field validations. On success the newly created event is returned with HTTP201 Created. The attendees field is not accepted as input — it starts at 0 and is managed by the system.
Request body
Display name of the event. Maximum 255 characters.
Full text description of the event.
Total number of available attendee spots.
Ticket price for the event.
Event start date/time. Must be a valid date string parseable by PHP (e.g.
2024-09-15 or 2024-09-15T09:00:00).Event end date/time. Must be a valid date on or after
start_date.ID of an existing category from the
categories table.ID of an existing location from the
locations table.ID of an existing status from the
statuses table.Optional. ID of an existing user to associate with the event. May be omitted or explicitly sent as
null.Optional. URL string for the event’s cover image. May be omitted or explicitly sent as
null.The
store response returns the raw event model without eager-loaded relations. Call GET /api/event/{id} if you need the full relational payload immediately after creation.| Status | Body |
|---|---|
422 Unprocessable Entity | Laravel validation error object with per-field messages |
PUT /api/event/{id}
Updates an existing event. All body fields are optional — only the fields you include will be changed. Any field you do provide is still subject to the same validation rules as on creation. Path parameterThe unique identifier of the event to update.
New display name. Maximum 255 characters.
New description text.
Updated total capacity.
Updated ticket price.
Updated start date/time.
Updated end date/time. Must be on or after
start_date when provided.ID of the new category. Must exist in the
categories table.ID of the new location. Must exist in the
locations table.ID of the new status. Must exist in the
statuses table.ID of the new owning user. May be
null.New cover image URL. May be
null.| Status | Body |
|---|---|
404 Not Found | {"message": "Event not found"} |
422 Unprocessable Entity | Laravel validation error object with per-field messages |
DELETE /api/event/{id}
Permanently deletes the event with the given ID. The underlying database record uses soft-deletes (thedeleted_at column from the migration), so deleted rows are retained at the database level but excluded from all queries.
Path parameter
The unique identifier of the event to delete.
| Status | Body |
|---|---|
404 Not Found | {"message": "Event not found"} |