mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-05 18:23:48 +00:00
2.2.1 upgrade functions
This commit is contained in:
@@ -76,5 +76,6 @@ return [
|
|||||||
'2_1_2',
|
'2_1_2',
|
||||||
'2_2_0',
|
'2_2_0',
|
||||||
'2_2_0_13',
|
'2_2_0_13',
|
||||||
|
'2_2_1',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
namespace App\Users\Restrictions\Engines;
|
namespace App\Users\Restrictions\Engines;
|
||||||
|
|
||||||
use App\Users\Models\User;
|
use App\Users\Models\User;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
use App\Users\Restrictions\RestrictionsEngine;
|
use App\Users\Restrictions\RestrictionsEngine;
|
||||||
|
|
||||||
class MeteredBillingRestrictionsEngine implements RestrictionsEngine
|
class MeteredBillingRestrictionsEngine implements RestrictionsEngine
|
||||||
@@ -84,7 +85,11 @@ class MeteredBillingRestrictionsEngine implements RestrictionsEngine
|
|||||||
|
|
||||||
private function getDunningSequenceCount(User $user): int
|
private function getDunningSequenceCount(User $user): int
|
||||||
{
|
{
|
||||||
return cache()->remember("dunning-count.$user->id", 3600, fn () => $user?->dunning->sequence ?? 0);
|
if (Schema::hasTable('dunnings')) {
|
||||||
|
return cache()->remember("dunning-count.$user->id", 3600, fn () => $user?->dunning->sequence ?? 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function checkFailedPayments(User $user): bool
|
private function checkFailedPayments(User $user): bool
|
||||||
|
|||||||
@@ -22,6 +22,11 @@ class UpgradingVersionsController
|
|||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function upgrade_to_2_2_1(): void
|
||||||
|
{
|
||||||
|
($this->upgradeDatabase)();
|
||||||
|
}
|
||||||
|
|
||||||
public function upgrade_to_2_2_0_13(): void
|
public function upgrade_to_2_2_0_13(): void
|
||||||
{
|
{
|
||||||
setEnvironmentValue([
|
setEnvironmentValue([
|
||||||
|
|||||||
Reference in New Issue
Block a user