<?php

namespace Modules\User\Models\Resources;

use Illuminate\Http\Resources\Json\JsonResource;
use Modules\City\Models\Resources\CityResource;
use Modules\Country\Models\Resources\CountryResource;
use Modules\Region\Models\Resources\RegionResource;

class PaymentCardResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function toArray($request)
    {
        return [
            'id' => $this->id,
            'card_number'=>$this->card_number,
            'month'=>$this->month,
            'year'=>$this->year,
            'card'=>$this->card,
            'card_last'=>$this->card_last,
            'card_type'=>$this->card_type,
            'image'=>asset($this->card_type).'.png'

        ];
    }
}
