<?php

namespace App\Http\Controllers\Channel\Notice\Transformers;

class NoticeTransformer
{
    public function transform($notice){
        return [
            'id'   =>  $notice->id,
            'title'   =>  $notice->title,
            'content'   =>  $notice->content,
            'is_popup'   =>  $notice->is_popup,
            'status'   =>  $notice->status,
            'updated_time'   => date("Y-m-d H:i:s",strtotime($notice->updated_at)),
            'type_name'   =>  $notice->type_name,
            'type_id'   =>  $notice->type_id
        ];
    }
}