<?php

namespace App\Http\Controllers\Xchengxu\Order\Transformers;
use Hashids;
class BookOrderTransformer
{
    public function transform($res){
        return [
            //'bid_no_hash'          =>  $res->uid,
            'bid'          =>  Hashids::encode($res->bid),
            'book_name'    =>  $res->book_name,
            'uid'            =>  $res->uid,
            'created_at'      => date("Y-m-d H:i:s",strtotime($res->created_at)),
            'fee'            =>  $res->fee,
        ];
    }
}