123456789101112131415161718192021222324252627282930313233 |
- <?php
- namespace App\Transformers;
- use League\Fractal\TransformerAbstract;
- use App\Models\GrantItem;
- /**
- * Class GrantItemTransformer.
- *
- * @package namespace App\Transformers;
- */
- class GrantItemTransformer extends TransformerAbstract
- {
- /**
- * Transform the GrantItem entity.
- *
- * @param \App\Models\GrantItem $model
- *
- * @return array
- */
- public function transform(GrantItem $model)
- {
- return [
- 'id' => (int) $model->id,
- /* place your other model properties here */
- 'created_at' => $model->created_at,
- 'updated_at' => $model->updated_at
- ];
- }
- }
|