belongsTo(Team::class); } public function isValid() { $createdAt = $this->created_at; $diff = $createdAt->diffInMinutes(now()); if ($diff <= config('constants.invitation.link.expiration')) { return true; } else { $this->delete(); } } }