*/ protected $fillable = [ ]; /** * The attributes that should be hidden for serialization. * * @var array */ protected $hidden = [ ]; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'job' => CharacterJobEnum::class, ]; /** * Get the account that owns the player. */ public function account(): BelongsTo { return $this->belongsTo(Account::class, 'account_id', 'id'); } /** * Get the index of this player's account */ public function index(): BelongsTo { return $this->belongsTo(PlayerIndex::class, 'account_id', 'id'); } /** * Get this player's ranking */ public function highscore(): HasOne { return $this->hasOne(HighscoreCache::class, 'name', 'name'); } }