- Fix EventType deletion error handling (constraint violations) - Fix Event update error (package_id column missing) - Fix Event Type dropdown options (JSON display issue) - Fix EventPackagesRelationManager query error - Add missing translations for deletion errors - Apply Pint formatting
25 lines
746 B
PHP
25 lines
746 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources\Tenant;
|
|
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class EventPurchaseResource extends JsonResource
|
|
{
|
|
public function toArray(Request $request): array
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'events_purchased' => $this->events_purchased,
|
|
'amount' => $this->amount,
|
|
'currency' => $this->currency,
|
|
'provider' => $this->provider,
|
|
'status' => $this->status,
|
|
'external_receipt_id' => $this->external_receipt_id,
|
|
'purchased_at' => $this->purchased_at ? $this->purchased_at->toISOString() : null,
|
|
'created_at' => $this->created_at->toISOString(),
|
|
];
|
|
}
|
|
}
|