mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 12:33:56 +00:00
33 lines
901 B
PHP
33 lines
901 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class AffiliateResource extends JsonResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*
|
|
* @param \Illuminate\Http\Request $request
|
|
* @return array
|
|
*/
|
|
public function toArray($request)
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'code' => $this->code,
|
|
'campaign_name' => $this->campaign_name,
|
|
'campaign_description' => $this->campaign_description,
|
|
'is_active' => (bool) $this->is_active,
|
|
'created_by' => $this->created_by,
|
|
'clicks_count' => $this->clicks_count,
|
|
'registrations_count' => $this->registrations_count,
|
|
'orders_count' => $this->orders_count,
|
|
'created_at' => $this->created_at,
|
|
'updated_at' => $this->updated_at,
|
|
];
|
|
}
|
|
}
|
|
|