PostPresenter.php 559 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /*
  3. * This file is part of the Jiannei/lumen-api-starter.
  4. *
  5. * (c) Jiannei <longjian.huang@foxmail.com>
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. namespace App\Repositories\Presenters;
  11. use App\Repositories\Transformers\PostTransformer;
  12. class PostPresenter extends Presenter
  13. {
  14. /**
  15. * Prepare data to present.
  16. *
  17. * @return \League\Fractal\TransformerAbstract
  18. */
  19. public function getTransformer()
  20. {
  21. return new PostTransformer();
  22. }
  23. }