5 use Illuminate\Database\Eloquent\Factories\HasFactory;
6 use Illuminate\Foundation\Auth\User as Authenticatable;
7 use Illuminate\Notifications\Notifiable;
8 use Laravel\Sanctum\HasApiTokens;
11 class User extends Authenticatable
13 use HasApiTokens, HasFactory, Notifiable;
15 public function isParticipant(Tournament $tournament) {
16 foreach ($tournament->participants as $participant) {
17 if ($participant->user->id == $this->id) {
25 * The attributes that are mass assignable.
29 protected $fillable = [
43 * The attributes that should be hidden for serialization.
55 * The attributes that should be cast.
61 'username' => 'string',
62 'discriminator' => 'string',
65 'verified' => 'boolean',
67 'mfa_enabled' => 'boolean',
68 'refresh_token' => 'encrypted',