<?php

namespace App\Http\Resources;


use App\Models\ProductsStoresTransfers;
use Illuminate\Http\Resources\Json\JsonResource;
use DB;
use Auth;

class ProductsStoresTransfersResources extends JsonResource
{
    public function toArray($request)
    {

        $lang = $request->header('lang', '');



        $data = [

            'ar_name'=>$this->Product()->first()->P_Ar_Name,
            'en_name'=>$this->Product()->first()->P_En_Name,
            'V_id'=>$this->V1,
            'VV_id'=>$this->V2,
            'V_name'=>$this->V_Name,
            'VV_name'=>$this->VV_Name,
            'p_Code'=>$this->P_Code,
            'price'=>$this->Price,
            'avialble_qty'=>$this->Av_Qty,
            'trans_Qty'=>$this->Trans_Qty,
            'unit_ar_name'=>$this->Unit()->first()->Name,
            'unit_en_name'=>$this->Unit()->first()->NameEn,
            'total'=>$this->Total,
            'product_id'=>$this->Product,
            'unit_id'=>$this->Unit,


        ];


        return $data ;
    }

}
