mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 00:02:15 +00:00
v1.7 RC.1
This commit is contained in:
20
app/User.php
20
app/User.php
@@ -114,6 +114,26 @@ class User extends Authenticatable
|
||||
'used_capacity', 'storage'
|
||||
];
|
||||
|
||||
/**
|
||||
* Get tax rate id for user
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function taxRates()
|
||||
{
|
||||
$stripe = resolve('App\Services\StripeService');
|
||||
|
||||
// Get tax rates
|
||||
$rates = collect($stripe->getTaxRates());
|
||||
|
||||
// Find tax rate
|
||||
$user_tax_rate = $rates->first(function ($item) {
|
||||
return $item['jurisdiction'] === $this->settings->billing_country && $item['active'];
|
||||
});
|
||||
|
||||
return $user_tax_rate ? [$user_tax_rate['id']] : [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user used storage details
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user