mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-05-26 22:44:42 +00:00
backend update
This commit is contained in:
@@ -23,7 +23,8 @@ class PricingResource extends JsonResource
|
||||
'description' => $this->description,
|
||||
'price' => $this->price,
|
||||
'capacity_formatted' => format_gigabytes($this->features->first()->value),
|
||||
'capacity' => $this->features->first()->value,
|
||||
'capacity' => (int) $this->features->first()->value,
|
||||
'currency' => 'USD',
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
@@ -33,6 +33,9 @@ class UserResource extends JsonResource
|
||||
]
|
||||
],
|
||||
'relationships' => [
|
||||
'subscription' => $this->activeSubscriptions()->count() !== 0
|
||||
? new UserSubscription($this->subscription('main'))
|
||||
: null,
|
||||
'settings' => [
|
||||
'data' => [
|
||||
'id' => (string)$this->settings->id,
|
||||
@@ -55,7 +58,24 @@ class UserResource extends JsonResource
|
||||
'attributes' => $this->storage
|
||||
]
|
||||
],
|
||||
'subscription' => $this->activeSubscriptions()->count() !== 0 ? new UserSubscription($this->subscription('main')) : null,
|
||||
'favourites' => [
|
||||
'data' => [
|
||||
'id' => '1',
|
||||
'type' => 'folders_favourite',
|
||||
'attributes' => [
|
||||
'folders' => $this->favourite_folders->makeHidden(['pivot'])
|
||||
],
|
||||
],
|
||||
],
|
||||
'tree' => [
|
||||
'data' => [
|
||||
'id' => '1',
|
||||
'type' => 'folders_tree',
|
||||
'attributes' => [
|
||||
'folders' => $this->folder_tree
|
||||
],
|
||||
],
|
||||
],
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
@@ -19,10 +19,16 @@ class UserSubscription extends JsonResource
|
||||
'id' => $this->id,
|
||||
'type' => 'subscription',
|
||||
'attributes' => [
|
||||
'name' => $this->name,
|
||||
'slug' => $this->slug,
|
||||
'starts_at' => format_date($this->starts_at, '%d. %B. %Y'),
|
||||
'ends_at' => format_date($this->ends_at, '%d. %B. %Y'),
|
||||
'active' => $this->active(),
|
||||
'canceled' => $this->canceled(),
|
||||
'name' => $this->plan->name,
|
||||
'capacity' => (int) $this->plan->features->first()->value,
|
||||
'capacity_formatted' => format_gigabytes($this->plan->features->first()->value),
|
||||
'slug' => $this->slug,
|
||||
'canceled_at' => format_date($this->created_at, '%d. %B. %Y'),
|
||||
'created_at' => format_date($this->created_at, '%d. %B. %Y'),
|
||||
'starts_at' => format_date($this->starts_at, '%d. %B. %Y'),
|
||||
'ends_at' => format_date($this->ends_at, '%d. %B. %Y'),
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user