src/Gzero/Api/Transformer/RoleTransformer.php
public function transform($role)
    {
        $role = $this->entityToArray(Role::class, $role);
        return [
            'id'        => (int) $role['id'],
            'name'      => $role['name'],
            'createdAt' => $role['created_at'],
            'updatedAt' => $role['updated_at']
        ];
    }
public function transform($role)
    {
        $role = $this->entityToArray(Role::class, $role);
        return [
            'id'        => (int) $role['id'],
            'name'      => $role['name'],
            'createdAt' => $role['created_at'],
            'updatedAt' => $role['updated_at']
        ];
    }
public function transform ( $ role ) { $ role = $ this -> entityToArray ( Role :: class , $ role ) ; return [ 'id' => ( int ) $ role [ 'id' ] , 'name' => $ role [ 'name' ] , 'createdAt' => $ role [ 'created_at' ] , 'updatedAt' => $ role [ 'updated_at' ] ] ; }
Transforms role entity

@param Role|array $role Role entity

@return array
Transforms role entity