<?php namespace Tet\Test\Repositories\Presenter; use League\Fractal\TransformerAbstract; use Hashids; class NewsListTransformer extends TransformerAbstract { public function transform(\Tet\Test\Models\News $news) { return [ 'id' => $news->getRouteKey(), 'id' => $news->id, 'Title' => $news->Title, 'Body' => $news->Body, ]; } }