Corepine logo Corepine Wirechat
Login
Wirechat v0.6x latest

Invite

Invite stores invite links for joinable resources such as groups.

Core fields:

Field Purpose
panel_id Panel that owns the invite route.
inviteable_id Invited resource id.
inviteable_type Invited resource morph class.
created_by_id Model id that created the invite.
created_by_type Creator morph class.
token Unique public token used in the invite URL.
name Optional invite label.
limit Optional maximum number of uses.
usages Number of times the invite has been used.
is_primary Whether this is the primary invite link.
expires_at Optional expiration timestamp.
last_used_at Last usage timestamp.
revoked_at Revocation timestamp.

Important Helpers

  • active() filters usable invites.
  • primary() filters primary links.
  • additional() filters non-primary links.
  • isActive() checks revocation, expiration, and usage limits.
  • revoke() revokes the invite.
  • markUsed() increments usage and stores last_used_at.
  • url($panel = null, bool $absolute = true) builds the invite URL.