public function findNextTxId() { $uid = \Auth::user()->getAuthIdentifier(); $transfers = count(Transaction::query()->where('buyer_id', $uid)->where('provider', $this->getName())->get('txid')); return "U{$uid}TX{$transfers}A0"; }
/** * @param Authenticatable $user * @return string|null */ public static function getUserTier(Authenticatable $user) { $tx = Transaction::where('buyer_id', $user->getAuthIdentifier())->first(); return isset($tx) ? $tx->product : null; }