mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-06 05:00:51 +08:00
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.
20 lines
374 B
PHP
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;
|
|
}
|