IndentNumTransformer.php 665 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace App\Transformers;
  3. use League\Fractal\TransformerAbstract;
  4. use App\Models\IndentNum;
  5. /**
  6. * Class IndentNumTransformer.
  7. *
  8. * @package namespace App\Transformers;
  9. */
  10. class IndentNumTransformer extends TransformerAbstract
  11. {
  12. /**
  13. * Transform the IndentNum entity.
  14. *
  15. * @param \App\Models\IndentNum $model
  16. *
  17. * @return array
  18. */
  19. public function transform(IndentNum $model)
  20. {
  21. return [
  22. 'id' => (int) $model->id,
  23. /* place your other model properties here */
  24. 'created_at' => $model->created_at,
  25. 'updated_at' => $model->updated_at
  26. ];
  27. }
  28. }