handle SubscriptionWasCreated, SubscriptionWasExpired, SubscriptionWasUpdated on VueFileManager backend

This commit is contained in:
Čarodej
2021-11-19 19:53:16 +01:00
parent 6ca84d9041
commit 8faa865fb7
11 changed files with 158 additions and 27 deletions

View File

@@ -1,5 +1,4 @@
<?php
namespace App\Users\Resources;
use Domain\Folders\Resources\FolderCollection;
@@ -35,17 +34,15 @@ class UserResource extends JsonResource
'limitations' => [
'id' => $this->id,
'type' => 'limitations',
'data' => [
'data' => [
'attributes' => $this->limitations,
],
],
$this->mergeWhen($this->hasSubscription(), fn() => [
$this->mergeWhen($this->hasSubscription(), fn () => [
'subscription' => new SubscriptionResource($this->subscription),
]),
],
],
];
}
}