belongsTo(Account::class, 'id', 'id'); } public function gm() { return $this->belongsTo(Account::class, 'bannedby', 'username'); } public function banAppeal() { return $this->setConnection('mysql')->hasMany(BanAppeal::class, 'ban_id', 'banid'); } public function latestBanAppeal() { return $this->banAppeal()->orderBy('id', 'DESC')->first(); } }