<?php

namespace App\Http\Resources\ECom;


use App\Models\Coins;
use App\Models\Customers;
use App\Models\Employess;
use App\Models\GeneralDaily;
use App\Models\ReciptVoucherDetails;
use App\Models\ReturnSales;
use Illuminate\Http\Resources\Json\JsonResource;
use DB;
use Auth;
use DateTime;

class BrandsResources extends JsonResource
{


    public function toArray($request)
    {

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


        if($lang == 'ar'){

            $data=[
                'id'=>$this->id,
                'name'=>$this->Name,
                'image'=>URL::to($this->Image),

            ];



        }else{



            $data=[
                'id'=>$this->id,
                'name'=>$this->NameEn,
                'image'=>URL::to($this->Image),



            ];


        }




        return $data ;
    }

}



