<?php

namespace Slider\Com.ryo.test\Repositories\Presenter;

use League\Fractal\TransformerAbstract;
use Hashids;

class PisturesTransformer extends TransformerAbstract
{
    public function transform(\Slider\Com.ryo.test\Models\Pistures $pistures)
    {
        return [
            'id'                => $pistures->getRouteKey(),
            'key'               => [
                'public'    => $pistures->getPublicKey(),
                'route'     => $pistures->getRouteKey(),
            ], 
            'id'                => $pistures->id,
            'folder_upload'     => $pistures->folder_upload,
            'status'            => $pistures->status,
            'url'               => [
                'public'    => trans_url('com.ryo.test/'.$pistures->getPublicKey()),
                'user'      => guard_url('com.ryo.test/pistures/'.$pistures->getRouteKey()),
            ], 
            'status'            => trans('app.'.$pistures->status),
            'created_at'        => format_date($pistures->created_at),
            'updated_at'        => format_date($pistures->updated_at),
        ];
    }
}