These docs are a work in progress and may not be fully up to date. Some pages may contain internal notes for our team.
Skip to Content

Data model — Set

A Set is a named grouping of Locations used for category-based filtering in the Finder widget. In the product UI, Sets are labelled “Categories” — the underlying DB table and model use set/sets.

⚠️ Warning: The UI term is “Category” / “Categories”. Code, DB table names, API endpoints, and this documentation use “Set”. Do not use both terms interchangeably in code or error messages — pick one per context.

Table: sets

ColumnTypeNullableDescription
idbigint (auto-increment)noPrimary key
titlevarcharnoDisplay name shown in the Finder widget’s category filter
descriptiontextyesOptional internal description
created_attimestampnoLaravel auto-managed
updated_attimestampnoLaravel auto-managed

Relations

  • belongsToMany Location — via set_location pivot (set_id, location_id). The locations that belong to this category.
  • belongsToMany Map — via map_set pivot. The maps this Set is attached to.
  • belongsToMany Workspace — via set_workspace pivot (with timestamps). Scopes the Set to one or more workspaces.
  • belongsToMany User — via set_user pivot (owners). Returns only users.id for performance.

Set vs. Map distinction

Set (Category)Map
PurposeGroups locations by type/category for filteringContainer that backs a Finder and holds its location scope
Widget surfaceDrives the “Categories” filter dropdownNot directly visible; defines what locations appear
Created byUser explicitly in the dashboardAuto-created when a Finder is created
DB tablesetsmaps

A Map has many Sets; a Set can appear on many Maps. When a visitor filters by category in the widget, they are filtering by Set membership.

Computed / virtual attributes

None. No $appends, no JSON casts, no overridden toArray.