{$payment->getKeyName()} = $client->generateId($size = 8); }); } /** * @return BelongsTo */ public function user() { return $this->belongsTo(User::class); } public function formatToCurrency($value,$locale = 'de_DE') { $formatter = new NumberFormatter($locale, NumberFormatter::CURRENCY); return $formatter->formatCurrency($value, $this->currency_code); } }