Skip to main content

Invitation Model

Invitation Model:

The Invitation model manages user invitations within the system. It is responsible for tracking invitations sent to users and their corresponding referral relationships

Relationships:

  • **User (Referral User):**Each invitation is linked to a user who sent or received the invitation
    public function user()
    {
    return $this->belongsTo(config('larainvite.UserModel'));
    }

  • **Activity Logging:**The model logs activities using the Spatie Activity Log package
    public function getActivitylogOptions(): LogOptions
    {
    return LogOptions::defaults();
    }

Table Columns

  • id
  • table
  • created_at
  • updated_at