WalletTransformer.php 762 B

123456789101112131415161718192021222324252627282930
  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\Transformers;
  11. use App\Models\Device;
  12. use App\Models\Earning;
  13. use App\Models\Wallet;
  14. use App\Repositories\Enums\DeviceLineEnum;
  15. use App\Repositories\Enums\DeviceLuTypeEnum;
  16. use App\Repositories\Enums\DeviceStatusEnum;
  17. use App\Repositories\Enums\DeviceUseStatusEnum;
  18. use App\Repositories\Enums\DeviceWaterLevelEnum;
  19. use League\Fractal\TransformerAbstract;
  20. class WalletTransformer extends TransformerAbstract
  21. {
  22. public function transform(Wallet $model)
  23. {
  24. return $model->toArray();
  25. }
  26. }