for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Modules\Example\Transformers;
use Modules\Core\Abstracts\TransformerAbstract;
/**
* Class ExampleTransformer.
*/
class ExampleTransformer extends TransformerAbstract
{
* Transform the Example entity.
*
* @param \Modules\Example\Entities\Example $attribute
* @return array
public function fields($attribute)
return [
'id' => (int) $attribute->id,
'name' => (string) $attribute->name,
'value' => (string) $attribute->value,
];
}