Files
Xboard/app/Models/InviteCode.php
xboard a01b94f131 fix(register): handle invalid invite code gracefully
Fix an issue where entering a non-existent invite code during registration would result in an unclear HTTP code 0 error. Now, the system properly validates the invite code and returns a clear error response if the code does not exist.
2025-07-13 21:19:33 +08:00

20 lines
374 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class InviteCode extends Model
{
protected $table = 'v2_invite_code';
protected $dateFormat = 'U';
protected $casts = [
'created_at' => 'timestamp',
'updated_at' => 'timestamp',
'status' => 'boolean',
];
const STATUS_UNUSED = 0;
const STATUS_USED = 1;
}