123456789101112131415161718192021222324252627 |
- <?php
- namespace Knuckles\Scribe\Tests\Fixtures;
- use League\Fractal\TransformerAbstract;
- /**
- * A test transformer to show the functions.
- *
- * @author Tobias van Beek <t.vanbeek@tjvb.nl>
- */
- class TestTransformer extends TransformerAbstract
- {
- /**
- * A Fractal transformer.
- *
- * @return array
- */
- public function transform(TestModel $model)
- {
- return [
- 'id' => $model->id,
- 'description' => $model->description,
- 'name' => $model->name,
- ];
- }
- }
|