領収証発行サービス
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 line
985B

  1. <?php
  2. namespace App\Http\Controllers\Web\Custom\HelloTechno;
  3. use App\Codes\UserRole;
  4. use App\Http\Controllers\Web\IParam;
  5. use App\Util\Custom\HelloTechno\API;
  6. use Illuminate\Http\JsonResponse;
  7. use Illuminate\Http\Request;
  8. class CustomersController extends HelloTechnoController
  9. {
  10. public function name(): string
  11. {
  12. return "[HelloTechno専用]顧客情報取得";
  13. }
  14. public function description(): string
  15. {
  16. return "[HelloTechno専用]顧客情報を取得する";
  17. }
  18. public function __construct(
  19. protected CustomersParam $param,
  20. ) {
  21. parent::__construct();
  22. $this->roleAllow(UserRole::NORMAL_ADMIN);
  23. }
  24. protected function getParam(): IParam
  25. {
  26. return $this->param;
  27. }
  28. protected function run(Request $request): JsonResponse
  29. {
  30. $param = $this->param;
  31. $list = API::getCustomers($param->customerCode);
  32. return $this->successResponse(['records' => $list]);
  33. }
  34. }