mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-19 08:32:14 +00:00
Create invoice form part 1.
This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources\Oasis;
|
||||
|
||||
use App\Http\Resources\PlanResource;
|
||||
use App\Http\Resources\PricingResource;
|
||||
use App\Services\StripeService;
|
||||
use App\Http\Resources\PricingResource;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
|
||||
class SubscriptionRequestResource extends JsonResource
|
||||
{
|
||||
@@ -20,34 +17,34 @@ class SubscriptionRequestResource extends JsonResource
|
||||
{
|
||||
return [
|
||||
'data' => [
|
||||
'id' => $this->id,
|
||||
'type' => 'subscription-requests',
|
||||
'attributes' => [
|
||||
'requested_plan' => $this->requested_plan,
|
||||
'status' => $this->status,
|
||||
'id' => $this->id,
|
||||
'type' => 'subscription-requests',
|
||||
'attributes' => [
|
||||
'requested_plan' => $this->requested_plan,
|
||||
'status' => $this->status,
|
||||
'created_at_formatted' => format_date($this->created_at, '%d. %B. %Y'),
|
||||
],
|
||||
'relationships' => [
|
||||
'user' => [
|
||||
'data' => [
|
||||
'id' => $this->user->id,
|
||||
'type' => 'users',
|
||||
'id' => $this->user->id,
|
||||
'type' => 'users',
|
||||
'attributes' => [
|
||||
'name' => $this->user->settings->name,
|
||||
'address' => $this->user->settings->address,
|
||||
'state' => $this->user->settings->state,
|
||||
'city' => $this->user->settings->city,
|
||||
'postal_code' => $this->user->settings->postal_code,
|
||||
'country' => $this->user->settings->country,
|
||||
'name' => $this->user->settings->name,
|
||||
'address' => $this->user->settings->address,
|
||||
'state' => $this->user->settings->state,
|
||||
'city' => $this->user->settings->city,
|
||||
'postal_code' => $this->user->settings->postal_code,
|
||||
'country' => $this->user->settings->country,
|
||||
'phone_number' => $this->user->settings->phone_number,
|
||||
'ico' => $this->user->settings->ico,
|
||||
]
|
||||
]
|
||||
'ico' => $this->user->settings->ico,
|
||||
],
|
||||
],
|
||||
],
|
||||
'plan' => new PricingResource(
|
||||
resolve(StripeService::class)->getPlan($this->requested_plan)
|
||||
),
|
||||
]
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user